Popover

Description

The Popover is a UI component used to display temporary content that appears around a trigger element. This component can be used to display menus, tooltips, or additional information for users.

Usage


import { Popover, Button } from "mogora-ui";

export default function PopoverDemo() {
  return (
    <Popover>
      <Popover.Trigger>
        <Button className="px-2">
          <EllipsisVertical />
        </Button>
      </Popover.Trigger>
      <Popover.Content>
        <div className="p-4">This is a Popover Content</div>
      </Popover.Content>
    </Popover>
  )
}

API Reference

Popover

PropTypeDescription
childrenReactNodeElements to be rendered inside the popover.
classNamestringAdditional classes for styling.

Popover.Trigger

The trigger component used to display the popover when clicked.

PropTypeDescription
childrenReactNodeThe element that can be clicked to show the popover.
classNamestringAdditional classes for styling.

Popover.Content

The component that contains the displayed popover content.

PropTypeDescription
childrenReactNodeContent to be displayed inside the popover.
classNamestringAdditional classes for styling.
align"left" | "right"Determines the alignment of the popover content.