qat

Popover

Popover. It is copied into your app’s ui/ by qatjs add popover: the code is yours to edit.

Example

Example.qx21 linesOpen in the playground
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

shell1 line
npx qatjs add popover

Popover

As a custom element: <ui-popover>.

Popover: props
PropTypeAttribute
labelstringyes
triggerQatNodeproperty only
titleQatNodeproperty only
openbooleanyes
size'sm' | 'md'yes
Popover: events
EventDetail
on:update:openCustomEvent<boolean>

Keys

KeyDoes
Escclose
Tabpast the last control closes it