Components
Collapsible
Hides and reveals a single region of content.
Usage
Basic
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>Open by default
Starts expanded, for detail that is usually worth reading.
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>Progressive disclosure
Keeps the rare options out of the way until someone asks for them.
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>Anatomy
Collapsible is composed of the blocks below. Each one is a separate block that only renders inside its parent.
bsui/collapsiblebsui/collapsible-panelbsui/collapsible-trigger
Attributes
| Attribute | Type | Default |
|---|---|---|
defaultOpen | toggle | false |
disabled | toggle | false |
bsui/collapsible-panel
This block takes no attributes.
bsui/collapsible-trigger
| Attribute | Type | Default |
|---|---|---|
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 |