Components
Dialog
A modal layer for focused tasks and confirmations.
Usage
Basic
Edit profile
Make changes to your profile here, then save when you are done.
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="Edit profile" trigger_variant="outline" />
<bs:bsui-dialog-backdrop />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Edit profile" />
<bs:bsui-dialog-description content="Make changes to your profile here, then save when you are done." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-content>
<bs:bsui-field>
<bs:bsui-field-label text="Name" />
<bs:bsui-input defaultValue="Pedro Duarte" />
</bs:bsui-field>
</bs:bsui-dialog-content>
<bs:bsui-dialog-footer>
<bs:bsui-dialog-close label="Cancel" variant="outline" />
<bs:bsui-dialog-close label="Save changes" variant="default" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>Nested dialogs
A second dialog opened from inside the first, where the parent stays mounted and scales back behind the child.
Workspace settings
Renaming a workspace updates every invite link that points at it.
Delete Northwind?
Nine projects and their build history go with it.
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="Workspace settings" trigger_variant="outline" />
<bs:bsui-dialog-backdrop />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Workspace settings" />
<bs:bsui-dialog-description content="Renaming a workspace updates every invite link that points at it." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-content>
<bs:bsui-field>
<bs:bsui-field-label text="Workspace name" />
<bs:bsui-input defaultValue="Northwind" />
</bs:bsui-field>
</bs:bsui-dialog-content>
<bs:bsui-dialog-footer>
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="Delete" trigger_variant="destructive" />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Delete Northwind?" />
<bs:bsui-dialog-description content="Nine projects and their build history go with it." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-footer>
<bs:bsui-dialog-close label="Keep workspace" variant="outline" />
<bs:bsui-dialog-close label="Delete forever" variant="destructive" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>
<bs:bsui-dialog-close label="Save changes" variant="default" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>Three levels deep
Only the outermost dialog paints a backdrop, each open level scales the one behind it back, and Escape closes just the top of the stack.
Publish 2.4.0
Fourteen commits landed since the last tag.
Changes in this release
Two of them touch the public API.
Two breaking changes
Anyone still on 2.3 has to update their config before upgrading.
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="Publish release" />
<bs:bsui-dialog-backdrop />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Publish 2.4.0" />
<bs:bsui-dialog-description content="Fourteen commits landed since the last tag." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-footer>
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="Review changes" trigger_variant="outline" />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Changes in this release" />
<bs:bsui-dialog-description content="Two of them touch the public API." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-footer>
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="Breaking changes" trigger_variant="destructive" />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Two breaking changes" />
<bs:bsui-dialog-description content="Anyone still on 2.3 has to update their config before upgrading." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-footer>
<bs:bsui-dialog-close label="Understood" variant="default" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>
<bs:bsui-dialog-close label="Back" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>
<bs:bsui-dialog-close label="Publish" variant="default" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>Form with a select
A real create form in the dialog body, where the select listbox opens inside the popup rather than behind it.
New project
Projects inherit the plan of the workspace they belong to.
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="New project" />
<bs:bsui-dialog-backdrop />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="New project" />
<bs:bsui-dialog-description content="Projects inherit the plan of the workspace they belong to." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-content>
<bs:bsui-stack direction="column" gap="4" align="stretch">
<bs:bsui-field>
<bs:bsui-field-label text="Project name" />
<bs:bsui-input placeholder="Northwind API" />
<bs:bsui-field-description text="Lowercase letters, numbers and dashes." />
</bs:bsui-field>
<bs:bsui-field>
<bs:bsui-field-label text="Region" />
<bs:bsui-select placeholder="Pick a region" defaultValue="eu">
<bs:bsui-select-trigger />
<bs:bsui-select-popup>
<bs:bsui-select-option value="eu" label="Europe" />
<bs:bsui-select-option value="us" label="United States" />
<bs:bsui-select-option value="ap" label="Asia Pacific" />
</bs:bsui-select-popup>
</bs:bsui-select>
</bs:bsui-field>
<bs:bsui-checkbox label="Seed the project with sample data" defaultChecked="true" />
</bs:bsui-stack>
</bs:bsui-dialog-content>
<bs:bsui-dialog-footer>
<bs:bsui-dialog-close label="Cancel" variant="outline" />
<bs:bsui-dialog-close label="Create project" variant="default" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>Not dismissable
With dismissable off the dialog ignores Escape and backdrop clicks, so the corner close is the only way out.
Migration in progress
Closing this window does not stop the migration.
<bs:bsui-dialog dismissable="false">
<bs:bsui-dialog-trigger trigger_label="Migrate database" />
<bs:bsui-dialog-backdrop />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-close x="true" />
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Migration in progress" />
<bs:bsui-dialog-description content="Closing this window does not stop the migration." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-content>
<bs:bsui-progress value="62" max="100" label="Rewriting indexes" />
</bs:bsui-dialog-content>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>Anatomy
Dialog is composed of the blocks below. Each one is a separate block that only renders inside its parent.
bsui/dialogbsui/dialog-backdropbsui/dialog-popupbsui/dialog-closebsui/dialog-contentbsui/dialog-footerbsui/dialog-headerbsui/dialog-descriptionbsui/dialog-titlebsui/dialog-trigger
Attributes
| Attribute | Type | Default |
|---|---|---|
dismissable | toggle | true |
bsui/dialog-backdrop
This block takes no attributes.
bsui/dialog-popup
This block takes no attributes.
bsui/dialog-close
| Attribute | Type | Default |
|---|---|---|
label | richtext | — |
variant | outline | |
x | toggle | false |
bsui/dialog-content
This block takes no attributes.
bsui/dialog-footer
This block takes no attributes.
bsui/dialog-header
This block takes no attributes.
bsui/dialog-description
| Attribute | Type | Default |
|---|---|---|
content | richtext | — |
bsui/dialog-title
| Attribute | Type | Default |
|---|---|---|
content | richtext | — |
bsui/dialog-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 |