Composants
Info-bulle
Une courte indication affichée au survol ou à la prise de focus.
Utilisation
Basique
Shortcut: Cmd K
HTML
<bs:bsui-tooltip>
<bs:bsui-tooltip-trigger trigger_label="Hover me" trigger_variant="outline" />
<bs:bsui-tooltip-popup content="Shortcut: Cmd K" />
</bs:bsui-tooltip>Délais d’ouverture et de fermeture
Deux déclencheurs avec des délais différents : l’un s’affiche dès le premier instant du survol, l’autre reste visible après le départ du pointeur.
Shows the hint on the first hover frame
Stays up as the pointer moves away
HTML
<bs:bsui-stack direction="row" gap="3" justify="center">
<bs:bsui-tooltip openDelay="0">
<bs:bsui-tooltip-trigger trigger_label="Instant" trigger_variant="secondary" />
<bs:bsui-tooltip-popup content="Shows the hint on the first hover frame" />
</bs:bsui-tooltip>
<bs:bsui-tooltip openDelay="600" closeDelay="400">
<bs:bsui-tooltip-trigger trigger_label="Patient" trigger_variant="secondary" />
<bs:bsui-tooltip-popup content="Stays up as the pointer moves away" />
</bs:bsui-tooltip>
</bs:bsui-stack>Infobulle d’icône
Un déclencheur d’icône fantôme à côté d’un libellé de champ, l’emplacement habituel des infobulles dans les produits.
Retention window
Logs older than the window are deleted nightly
HTML
<bs:bsui-stack direction="row" gap="2" align="center" justify="center">
<bs:bsui-text content="Retention window" variant="label" tag="span" />
<bs:bsui-tooltip openDelay="0">
<bs:bsui-tooltip-trigger trigger_label="?" trigger_variant="ghost" trigger_size="icon-sm" />
<bs:bsui-tooltip-popup content="Logs older than the window are deleted nightly" />
</bs:bsui-tooltip>
</bs:bsui-stack>Anatomie
Info-bulle est composé des blocs ci-dessous. Chacun est un bloc distinct qui ne s’affiche qu’à l’intérieur de son parent.
bsui/tooltipbsui/tooltip-popupbsui/tooltip-trigger
Attributs
| Attribut | Type | Par défaut |
|---|---|---|
openDelay | number | 600 |
closeDelay | number | 0 |
bsui/tooltip-popup
| Attribut | Type | Par défaut |
|---|---|---|
content | richtext | — |
bsui/tooltip-trigger
| Attribut | Type | Par défaut |
|---|---|---|
trigger | text | — |
trigger_block | text | bsui/button |
trigger_label | richtext | — |
trigger_icon | icon | — |
trigger_iconPosition | left | |
trigger_href | text | — |
trigger_variant | default | |
trigger_size | default | |
trigger_disabled | toggle | false |