Popover

The popover component is used to display a dialog that appears when a user interacts with a trigger element.

Imports

`Root` - The root of the component, what wraps everything.

`Trigger` - The trigger that opens the popover.

`Content` - The content, what's displayed to the user.

Installation

npx neel-ui add popover

Example

Different Placement

There are many different sides that the popover can open on, and you can also have it be 'auto'.

API Reference

Props of the `Popover` component. `*` denotes the default value.

Attribute
Type
Description
Parent
padding
`number`
The seperation between the trigger and the content, defaults to `4`.
`Content`
placement
What side the content should open on, defaults to `bottom`.
`Content`
fullWidthOfTrigger
`boolean`
If the content should be the full width of the trigger, defaults to `false`.
`Content`
role
`string`
The role of the content, defaults to `menu`.
`Content`
tabIndex
`number`
The tabIndex of the content, defaults to `-1`.
`Content`