Komponenter
Fällbar
Döljer och visar ett enda innehållsområde.
Användning
Grundläggande
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>Öppna som standard
Börjar utfälld, för innehåll som oftast är värt att läsa.
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>Progressiv visning
Håller de ovanliga alternativen ur vägen tills någon efterfrågar dem.
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>Struktur
Fällbar består av blocken nedan. Varje block är ett separat block som bara renderas inuti sin förälder.
bsui/collapsiblebsui/collapsible-panelbsui/collapsible-trigger
Attribut
| Attribut | Typ | Standard |
|---|---|---|
defaultOpen | toggle | false |
disabled | toggle | false |
bsui/collapsible-panel
Det här blocket har inga attribut.
bsui/collapsible-trigger
| Attribut | Typ | Standard |
|---|---|---|
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 |