Props
| Name | Description |
|---|---|
activator Type: ElementOrComponentRefOrSelector | External activator: an HTMLElement, a Vue component ref, or a CSS selector string (looked up in the document once the tooltip mounts). When provided, the activator slot is not rendered and event listeners are attached programmatically to the referenced element. Rarely what you want on a tooltip: |
arrowPadding Type: numberDefault10 | Space the arrow will maintain to the edge of the tooltip bubble. Useful when the floating element has border radius so it won't appear broken How far the arrow stays from the corner of the bubble. Raise it when a rounded bubble makes the point look detached; it does nothing when |
boundary Type: ElementOrComponentRefOrSelector | Constrains the tooltip within a bounding element: it stays inside it alongside its trigger (sideways for a tooltip above or below); away from the trigger it may pass the edge, and it flips at the viewport only. Accepts an HTMLElement, a Vue component ref, or a CSS selector string. Constrains the bubble to a container instead of the viewport — a scrolling sidebar, a table body. Positioning only: it does not clip the text. |
delay Type: numberDefault100 | Milliseconds a pointer rests on the activator before the tooltip shows ( Delays the hover open only (100 ms by default): keyboard focus opens at once, and a tooltip reached within 300 ms of another one closing skips the wait. The close is always a short debounce so the pointer can travel from the trigger into the bubble, which is why this is not the prop for keeping a hint on screen longer. See example |
disabled Type: booleanDefaultfalse | Disables the component Also dismisses a bubble that is already open, so it is safe to bind — the usual case being a hint that should stop firing once the same text is visible in the page. |
eager Type: booleanDefaultfalse | Renders the tooltip's popover and content at mount instead of on the first open. The description screen readers hear exists from mount either way. The bubble is lazy and renders on first open. This matters less here than on |
hideArrow Type: booleanDefaultfalse | Hides the tooltip arrow. A tooltip shows its arrow by default (it's the one popover-family surface where an arrow is meaningful — a speech bubble pointing at its anchor); set this to drop it. The tooltip is the one surface in the popover family that kept its arrow in v3 — popovers, dropdowns, selects and the colour palette all lost theirs. Set this on a dense row where the point would land on a neighbouring control. See example |
id Type: string | Seed for the tooltip's internal id. It is prefixed ( |
modelValue Type: booleanDefaultfalse | Used by v-model to show / hide the tooltip. A tooltip with no |
padding Type: numberDefault10 | Minimum empty space to keep from the edge of the page |
placement Type: PlacementDefault"top" | Position of the overlay in respect to the related activator. Flips itself near a viewport edge, so pick what reads best in the common case. Unlike |
pt Type: PtMap<BbTooltipPtPart, "open" | "default" | "destructive"> | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | Passthrough, attribute form: one attribute per part, |
text Type: string | Text content of the component. The plain-text label, and the form that also produces the description at mount. Use the default slot instead only when the label needs markup. See example |
transitionDuration Type: numberDefault250 | How long the transition has to last in milliseconds |
variant Type: keyof TooltipVariantRegistryDefault"default" | Visual variant. Typed against the registered names, so |
width Type: string | number | Caps the bubble's width (it still shrinks to its text): a number is px, a percentage is of the activator, any other CSS length passes through. Replaces the default A maximum, not a fixed width: the bubble still shrinks to short text. Bubbles already wrap at |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: boolean | New in v3, and rarely the right tool: a hint the application opens rather than the reader is usually a coach mark, which needs a panel the user can move into — |
Events
| Name | Description |
|---|---|
update:modelValue Type: (value: boolean): void | Emitted with the new value whenever |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
activator Type: BbTooltipActivatorSlotProps | Replaces the default trigger element that opens the tooltip. Spread |
default Type: object | Content rendered inside the tooltip bubble. Markup is allowed and is flattened into one |
Renamed and removed
Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.
blockremovedfails silentlyshowCloseremovedfails silentlythemevariantfails silentlytimeoutdelayfails silently