구성 요소
대화상자
집중 작업 및 확인에 사용하는 모달 레이어입니다.
사용법
기본
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>중첩된 대화상자
첫 번째 대화상자 안에서 두 번째 대화상자를 엽니다. 부모 대화상자는 마운트된 상태로 유지되며 자식 대화상자 뒤에서 작아집니다.
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>3단계 중첩
가장 바깥 대화상자만 배경을 표시하고, 각 단계를 열 때마다 뒤에 있는 대화상자가 작아집니다. Escape를 누르면 스택의 맨 위 대화상자만 닫힙니다.
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>선택 메뉴가 있는 폼
대화상자 본문에 있는 실제 생성 폼입니다. 선택 메뉴 목록 상자는 팝업 뒤가 아니라 팝업 안에서 열립니다.
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>닫을 수 없음
dismissable을 끄면 Escape 키와 배경 클릭이 무시되므로 모서리의 닫기 버튼으로만 나갈 수 있습니다.
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>구조
대화상자의 구성 블록은 아래와 같습니다. 각 블록은 별도의 블록이며 부모 블록 안에서만 렌더링됩니다.
bsui/dialogbsui/dialog-backdropbsui/dialog-popupbsui/dialog-closebsui/dialog-contentbsui/dialog-footerbsui/dialog-headerbsui/dialog-descriptionbsui/dialog-titlebsui/dialog-trigger
속성
| 속성 | 유형 | 기본값 |
|---|---|---|
dismissable | toggle | true |
bsui/dialog-backdrop
이 블록은 속성을 받지 않습니다.
bsui/dialog-popup
이 블록은 속성을 받지 않습니다.
bsui/dialog-close
| 속성 | 유형 | 기본값 |
|---|---|---|
label | richtext | — |
variant | outline | |
x | toggle | false |
bsui/dialog-content
이 블록은 속성을 받지 않습니다.
bsui/dialog-footer
이 블록은 속성을 받지 않습니다.
bsui/dialog-header
이 블록은 속성을 받지 않습니다.
bsui/dialog-description
| 속성 | 유형 | 기본값 |
|---|---|---|
content | richtext | — |
bsui/dialog-title
| 속성 | 유형 | 기본값 |
|---|---|---|
content | richtext | — |
bsui/dialog-trigger
| 속성 | 유형 | 기본값 |
|---|---|---|
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 |