2.11.0
Tooltip Component in Bolt
Tooltip component. Part of the Bolt “Components” CSS framework that powers the Bolt Design System.
npm install @bolt/components-tooltip
The tooltip component provides the user with a onHover Or onClick (button) toggle to display nearly any kind of content or Bolt Component nested within.
noWrap
option should only be used when small snippets of text or content are used {% include "@bolt-components-tooltip/tooltip.twig" with {
trigger: {
type: "text",
text: "This is the tooltip trigger"
},
content: "This is the tooltip content."
} only %}
Note: when assigning component props as HTML attributes on a web component, make sure to use kebab-case
.
Prop Name | Description | Type | Default Value | Option(s) |
---|---|---|---|---|
|
Provides the data for our trigger type |
object
| — |
|
|
This can be text OR an included bolt component (like Block List) |
any
| — |
|
|
Should tooltip push up or down? |
string
|
up
|
|
|
|
boolean
|
false
|
|
|
Spacing within our tooltip content bubble |
string
|
small
|
|
Theme: xlight
Theme: light
Theme: dark
Theme: xdark