Docs
Components
Popover

Popover

Key Features

  1. Accessibility:
    • Implements ARIA attributes for improved screen reader support.
    • Automatically handles focus and keyboard navigation.
  2. Customizable Positioning:
    • Supports top, bottom, left, and right positions for the popover content.
    • The Indicator dynamically adjusts to align with the trigger.
  3. Click outside or press Escape to close
  4. Flexible styling

Examples

breadcrumb

Props

Prop NameTypeRequiredDescription
titlestringYesThe title text to display in the popover
descriptionstringYesThe description/content text of the popover
triggerLabelstringYesThe text to display on the trigger button
positiontop, right, bottom, leftYesThe position where the popover will appear relative to the trigger

Popover

PropTypeDescriptionRequired
childrenReact.ReactNodeThe child components, typically PopoverTrigger and PopoverContent.Yes
classNamestringAdditional CSS class names for styling the container.No

PopoverTrigger

PropTypeDescriptionRequired
childrenReact.ReactNodeThe content inside the trigger button.Yes
onClickfunctionOptional custom click handler, combined with state toggling.No
classNamestringAdditional CSS class names for styling the trigger button.No

PopoverContent

PropTypeDescriptionRequired
positiontop, right, bottom, leftControls the position of the popover content relative to the trigger element.No
childrenReact.ReactNodeThe content to display inside the popover.Yes
classNamestringAdditional CSS class names for styling the popover container.No

Indicator

PropTypeDescriptionRequired
positiontop, right, bottom, leftControls the position of the indicator relative to the trigger element.No

Functionality:

  • Displays a small arrow to indicate the trigger for the popover.
  • Dynamically adjusts the arrow position based on the position prop and the trigger element's size.