Componentes
Janela pop-up
Conteúdo rico ancorado em um acionador, fechado ao clicar fora.
Uso
Básico
Anyone with the link can view this project.
HTML
<bs:bsui-popover>
<bs:bsui-popover-trigger trigger_label="Share" trigger_variant="outline" />
<bs:bsui-popover-popup>
<bs:bsui-text content="Anyone with the link can view this project." variant="muted" />
<bs:bsui-input defaultValue="https://northwind.app/p/4kd9" />
</bs:bsui-popover-popup>
</bs:bsui-popover>Formulário de filtros
Um seletor e um botão de alternância dentro do pop-up, com o botão de fechar também funcionando como botão de aplicar.
Passed
Failed
Skipped
HTML
<bs:bsui-popover>
<bs:bsui-popover-trigger trigger_label="Filter runs" trigger_variant="outline" />
<bs:bsui-popover-popup>
<bs:bsui-stack direction="column" gap="4" align="stretch">
<bs:bsui-field>
<bs:bsui-field-label text="Status" />
<bs:bsui-select placeholder="Any status" defaultValue="failed">
<bs:bsui-select-trigger />
<bs:bsui-select-popup>
<bs:bsui-select-option value="passed" label="Passed" />
<bs:bsui-select-option value="failed" label="Failed" />
<bs:bsui-select-option value="skipped" label="Skipped" />
</bs:bsui-select-popup>
</bs:bsui-select>
</bs:bsui-field>
<bs:bsui-switch label="Only my runs" defaultChecked="true" />
<bs:bsui-popover-close label="Apply filters" />
</bs:bsui-stack>
</bs:bsui-popover-popup>
</bs:bsui-popover>No rodapé de um cartão
O popover se ancora ao próprio acionador, podendo ficar no rodapé ao lado da ação principal.
Quarterly report
Draft, last edited two hours ago.
Anyone with this link can comment.
HTML
<bs:bsui-card>
<bs:bsui-card-header>
<bs:bsui-card-title label="Quarterly report" />
<bs:bsui-card-description label="Draft, last edited two hours ago." />
</bs:bsui-card-header>
<bs:bsui-card-footer>
<bs:bsui-popover>
<bs:bsui-popover-trigger trigger_label="Share" trigger_variant="outline" />
<bs:bsui-popover-popup>
<bs:bsui-text content="Anyone with this link can comment." variant="muted" />
<bs:bsui-input defaultValue="https://northwind.app/r/4kd9" />
<bs:bsui-popover-close label="Copy link" />
</bs:bsui-popover-popup>
</bs:bsui-popover>
<bs:bsui-button label="Publish" />
</bs:bsui-card-footer>
</bs:bsui-card>Fechamento pelo canto
O fechamento com x exibe um botão de ícone fantasma no canto do pop-up, deixando o corpo livre para uma chamada à ação.
Release 2.4 is live
Prerendering now covers logged in visitors on every static route.
Read the changelogHTML
<bs:bsui-popover>
<bs:bsui-popover-trigger trigger_label="What is new" trigger_variant="outline" />
<bs:bsui-popover-popup>
<bs:bsui-popover-close x="true" />
<bs:bsui-text content="Release 2.4 is live" variant="title" tag="h4" />
<bs:bsui-text content="Prerendering now covers logged in visitors on every static route." variant="muted" />
<bs:bsui-button label="Read the changelog" href="/blog/" variant="link" />
</bs:bsui-popover-popup>
</bs:bsui-popover>Anatomia
Janela pop-up é composto pelos blocos abaixo. Cada um é um bloco separado que só é renderizado dentro do bloco pai.
bsui/popoverbsui/popover-popupbsui/popover-closebsui/popover-trigger
Atributos
| Atributo | Tipo | Padrão |
|---|---|---|
defaultOpen | toggle | false |
bsui/popover-popup
Este bloco não aceita atributos.
bsui/popover-close
| Atributo | Tipo | Padrão |
|---|---|---|
label | richtext | — |
x | toggle | false |
bsui/popover-trigger
| Atributo | Tipo | Padrão |
|---|---|---|
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 |