ButtonPopover()function

ButtonPopover({
	children: [buttonChildren, ...popoverChildren], //
	...props
}: ButtonPopoverProps): ReactElement
ParamType
propsButtonPopoverProps
Props for ButtonPopover, a button that toggles an adjacent popover. required
    .childrenPopoverChildren
Children tuple for Popover: a leading trigger node followed by the popover's contents. required
Return
ReactElement
A Popover wrapping a Button that toggles it open and closed.

A button that, when clicked, shows a popover next to it when clicked or focused.

  • The first element passed to children is used as the content for the button, the rest is the content of the popover.

DH: Would love to use new HTML popover="auto" functionality for this but the anchor positioning it needs is not supported everywhere yet.

Examples

<ButtonPopover>{label}{panel}</ButtonPopover>