Props
| Name | Description |
|---|---|
activator Type: ElementOrComponentRef | External activator element or component ref. When provided, the activator slot is not rendered and the hover / focus listeners are attached programmatically to the referenced element. For a card per row, |
boundary Type: ElementOrComponentRefOrSelector | Constrains the card within a bounding element: it stays inside it alongside its trigger (sideways for a card 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. |
delay Type: numberDefault350 | Milliseconds the pointer (or keyboard focus) rests on the activator before the card shows; longer than BbTooltip's, so passing over does not open it. Closing has a fixed grace (guide § Timing and the safe zone). Holds the open back for hover and keyboard focus alike, with no skip for a neighbour reached quickly. Closing is not configurable: the card waits a fixed 200 ms, and a pointer travelling toward the card stays inside a safe zone. See example |
disabled Type: booleanDefaultfalse | Disables the component. Disabling an open card closes it. |
eager Type: booleanDefaultfalse | Renders the card's content at mount instead of on the first open. |
id Type: string | The activator's id (the card is |
modelValue Type: booleanDefaultfalse | Used by v-model to open / close the card. A card with no |
offset Type: numberDefault4 | Space the floating container will maintain from the activator. See example |
padding Type: numberDefault10 | Minimum empty space to keep from the edge of the page. |
placement Type: PlacementDefault"bottom" | Position of the card relative to the activator. Flips itself near a viewport edge. Unlike |
pt Type: PtMap<BbHoverCardPtPart, "open"> | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | Passthrough, attribute form: one attribute per part, The same parts as |
scrollable Type: booleanDefaultfalse | Caps the card height to the available viewport space and enables internal scrolling. |
transitionDuration Type: numberDefault250 | How long the transition has to last in milliseconds. |
width Type: string | number | Width of the card. Accepts pixels or percentage (relative to activator width). See example |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: boolean | Opens the card from elsewhere, a keyboard shortcut or a test. A click on the activator never toggles it, so this is the way when something other than hover must open it. |
Events
| Name | Description |
|---|---|
hide Type: (): void | Emitted as soon as the card starts to close (model becomes false). |
show Type: (): void | Emitted as soon as the card starts to open (model becomes true). |
shown Type: (): void | Emitted after the card is fully opened. Focus never moves on open. |
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: BbHoverCardActivatorSlotProps | The element the card describes. Spread Spread |
default Type: BbHoverCardDefaultSlotProps | The card body. See example |
footer Type: BbHoverCardDefaultSlotProps | Content pinned to the bottom of the card, outside the scroll region. The usual home for shortcuts. Each one must also exist on the page the activator links to: a touch screen never shows the card. See example |
header Type: BbHoverCardDefaultSlotProps | Content pinned to the top of the card, outside the scroll region. See example |