Popover
Popover. It is copied into your app’s ui/ by qatjs add popover: the code is yours to edit.
Example
Show orders that are
import Button from './ui/button/button.qx'
import { Checkbox } from './ui/checkbox/checkbox.qx'
import Popover from './ui/popover/popover.qx'
export default function Example() {
return (
<Popover label="Filters" title="Show orders that are">
<Checkbox label="New" checked />
<Checkbox label="On the way" checked />
<Checkbox label="Delivered" />
<div class="example-row">
<Button size="sm" variant="tertiary">
Clear
</Button>
<Button size="sm" variant="primary">
Apply
</Button>
</div>
</Popover>
)
}Add it
npx qatjs add popoverPopover
As a custom element: <ui-popover>.
| Prop | Type | Attribute |
|---|---|---|
label | string | yes |
trigger | QatNode | property only |
title | QatNode | property only |
open | boolean | yes |
size | 'sm' | 'md' | yes |
| Event | Detail |
|---|---|
on:update:open | CustomEvent<boolean> |
Keys
| Key | Does |
|---|---|
| Esc | close |
| Tab | past the last control closes it |