Componentes
Menú emergente
Contenido enriquecido anclado a un activador que se cierra al hacer clic fuera.
Uso
Básica
Anyone with the link can view this project.
<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>Formulario de filtros
Un selector y un interruptor dentro de la ventana emergente; el botón de cierre también sirve para aplicar los cambios.
<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>En el pie de una tarjeta
El menú emergente se ancla a su propio activador, por lo que puede colocarse en un pie junto a la acción principal.
Quarterly report
Draft, last edited two hours ago.
Anyone with this link can comment.
<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>Cierre en la esquina
El botón de cierre «x» muestra un botón de icono fantasma en la esquina de la ventana emergente y deja el cuerpo libre para una llamada a la acción.
Release 2.4 is live
Prerendering now covers logged in visitors on every static route.
Read the changelog<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>Estructura
Menú emergente se compone de los bloques siguientes. Cada uno es un bloque independiente que solo se representa dentro de su elemento principal.
bsui/popoverbsui/popover-popupbsui/popover-closebsui/popover-trigger
Atributos
| Atributo | Tipo | Predeterminado |
|---|---|---|
defaultOpen | toggle | false |
bsui/popover-popup
Este bloque no admite atributos.
bsui/popover-close
| Atributo | Tipo | Predeterminado |
|---|---|---|
label | richtext | — |
x | toggle | false |
bsui/popover-trigger
| Atributo | Tipo | Predeterminado |
|---|---|---|
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 |