Composants
Rétractable
Masque et affiche une seule zone de contenu.
Utilisation
Basique
Cache, workers, and build flags live here.
HTML
<bs:bsui-collapsible>
<bs:bsui-collapsible-trigger trigger_label="Show advanced options" trigger_variant="outline" />
<bs:bsui-collapsible-panel>
<bs:bsui-text content="Cache, workers, and build flags live here." variant="muted" />
</bs:bsui-collapsible-panel>
</bs:bsui-collapsible>Ouvert par défaut
Commence déplié, pour les détails qui méritent généralement d’être lus.
Faster page sync, a new table block, and fourteen bug fixes.
HTML
<bs:bsui-collapsible defaultOpen="true">
<bs:bsui-collapsible-trigger trigger_label="Release notes" trigger_variant="ghost" trigger_size="sm" />
<bs:bsui-collapsible-panel>
<bs:bsui-text content="Faster page sync, a new table block, and fourteen bug fixes." variant="muted" />
</bs:bsui-collapsible-panel>
</bs:bsui-collapsible>Divulgation progressive
Garde les options rarement utilisées à l’écart jusqu’à ce qu’on les demande.
Deploy to production
Builds the current branch and swaps the live release.
HTML
<bs:bsui-card>
<bs:bsui-card-header>
<bs:bsui-card-title label="Deploy to production" />
<bs:bsui-card-description label="Builds the current branch and swaps the live release." />
</bs:bsui-card-header>
<bs:bsui-card-content>
<bs:bsui-collapsible>
<bs:bsui-collapsible-trigger trigger_label="Show advanced options" trigger_variant="ghost" trigger_size="sm" />
<bs:bsui-collapsible-panel>
<bs:bsui-stack direction="column" gap="3" align="start">
<bs:bsui-switch label="Skip the build cache" />
<bs:bsui-switch label="Warm the static pages afterwards" defaultChecked="true" />
</bs:bsui-stack>
</bs:bsui-collapsible-panel>
</bs:bsui-collapsible>
</bs:bsui-card-content>
<bs:bsui-card-footer>
<bs:bsui-button label="Deploy" />
</bs:bsui-card-footer>
</bs:bsui-card>Anatomie
Rétractable est composé des blocs ci-dessous. Chacun est un bloc distinct qui ne s’affiche qu’à l’intérieur de son parent.
bsui/collapsiblebsui/collapsible-panelbsui/collapsible-trigger
Attributs
| Attribut | Type | Par défaut |
|---|---|---|
defaultOpen | toggle | false |
disabled | toggle | false |
bsui/collapsible-panel
Ce bloc ne prend aucun attribut.
bsui/collapsible-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 |