Popover | PopoverTrigger
PopoverTrigger#
Description#
- Component representing the element that opens the popover. Registers itself as the trigger in the
Popovercontext and toggles the open state on click. Withas-childit wraps nothing and applies attributes directly to the child.
Props#
asChild(boolean) — Iftrue, does not wrap in adivand applies attributes to the only child. Default:false.disabled(boolean) — Disables interaction: does not open the popover on click. Default:false.
Usage#
| |
Notes#
aria-haspopupisdialog—what opens is not a menu—.aria-expandedreflects the open state.- With
as-childthe child is cloned with the attributes and the click handler.