Appearance
Hover Card β
Loading...
<flint-hover-card-trigger> β
Trigger element for a hover card. Place inside flint-hover-card. Automatically wires up to the nearest flint-hover-card ancestor.
- Tag:
<flint-hover-card-trigger> - Class:
FlintHoverCardTrigger
Import β
ts
import 'flint-ui'; // auto-registers all
// or
import { FlintHoverCardTrigger } from 'flint-ui';Usage β
html
<flint-hover-card-trigger></flint-hover-card-trigger>Slots β
| Name | Description |
|---|---|
(default) | The element that activates the hover card (link, button, avatarβ¦). |
CSS Custom Properties β
| Property | Default |
|---|---|
--flint-hovercard-z-index | 1000 |
--flint-hovercard-duration | 150ms |
--flint-hovercard-bg | var(--flint-surface-1 |
--flint-hovercard-border-color | var(--flint-border-color |
--flint-hovercard-radius | 8px |
--flint-hovercard-shadow | 0 4px 16px rgba(0, 0, 0, 0.12 |
--flint-hovercard-padding | 16px |
--flint-hovercard-min-width | 200px |
--flint-font-family | β |
--flint-hovercard-font-size | 0.875rem |
--flint-hovercard-color | var(--flint-text-color |
<flint-hover-card-content> β
- Tag:
<flint-hover-card-content> - Class:
FlintHoverCardContent
Import β
ts
import 'flint-ui'; // auto-registers all
// or
import { FlintHoverCardContent } from 'flint-ui';Usage β
html
<flint-hover-card-content></flint-hover-card-content>Properties β
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
side | side | 'top' | 'right' | 'bottom' | 'left' | 'bottom' | Which side of the trigger to display the card on. |
align | align | 'start' | 'center' | 'end' | 'center' | Alignment of the card along the cross axis relative to the trigger. |
open | open | boolean | false | Whether the card is visible. Managed by the parent flint-hover-card. |
Slots β
| Name | Description |
|---|---|
(default) | Default slot for content |
<flint-hover-card> β
Root container for a hover card. Manages open/closed state with configurable open and close delays.
- Tag:
<flint-hover-card> - Class:
FlintHoverCard
Import β
ts
import 'flint-ui'; // auto-registers all
// or
import { FlintHoverCard } from 'flint-ui';Usage β
html
<flint-hover-card></flint-hover-card>Properties β
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
openDelay | open-delay | number | 700 | Delay in milliseconds before the hover card opens. |
closeDelay | close-delay | number | 300 | Delay in milliseconds before the hover card closes. |
Events β
| Event | Detail | Description |
|---|---|---|
flint-hover-card-open | β | Fired when the card becomes visible. |
flint-hover-card-close | β | Fired when the card is dismissed. |
Slots β
| Name | Description |
|---|---|
(default) | Accepts flint-hover-card-trigger and flint-hover-card-content. |
Methods β
| Method | Description |
|---|---|
isOpen(): boolean | Whether the card is currently open. |