PolyHunter

Popover

Hover decoration requires a fine pointer and hover support at widths of 768px or more. Phone and touch controls keep tap actions and keyboard focus without rollover effects.

A small overlay that displays content on top of the current page when triggered.

Playground

Live preview

Examples

Code

import {
  Button,
  CloseIcon,
  Popover,
  PopoverClose,
  PopoverContent,
  PopoverDescription,
  PopoverHeader,
  PopoverTitle,
  PopoverTrigger,
} from "@npolyhunter/ui";

<Popover>
  <PopoverTrigger asChild>
    <Button>Open popover</Button>
  </PopoverTrigger>
  <PopoverContent>
    <PopoverHeader>
      <div className="flex items-center justify-between gap-2">
        <PopoverTitle>Notifications</PopoverTitle>
        <PopoverClose aria-label="Close">
          <CloseIcon className="size-6" />
        </PopoverClose>
      </div>
      <PopoverDescription>
        You have 3 unread notifications.
      </PopoverDescription>
    </PopoverHeader>
  </PopoverContent>
</Popover>

Used in

Includes use through shared UI components.

AppBack Office