Live example

Usage
<Popover trigger="Theme" label="Theme settings">
  <RadioGroup legend="Mode" options={modes} />
</Popover>

Props

Popover props
PropTypeDefaultDescription
triggerReactNodenoneContent of the toggle button.
labelstringnoneAccessible name of the panel.
triggerLabel?stringnoneName for an icon-only trigger.
open?booleannoneControlled open state.
onOpenChange?(open: boolean) => voidnoneCalled when it opens or closes.
align?'start' | 'end''end'Edge the panel aligns to.

Do and don't

Do

  • Use for settings or filters that relate to the trigger.

Don't

  • Use for tasks that need full attention; use Dialog.

Accessibility

  • Disclosure pattern: the trigger has aria-expanded and aria-controls.
  • Escape closes and returns focus. Moving focus or clicking outside also closes it.

Keyboard

Popover keyboard support
KeysAction
Enter, SpaceToggles the panel
EscapeCloses and returns focus to the trigger