Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

UIComponentsReact

Popover

A floating panel anchored to its trigger, for content the reader opens on click.

Built on the headless Popover.See its API in Docs

Rendered by React 19.3.1

popover.tsx

Installation

npx shadcn@4.23.0 add https://hamur.dev/r/react/popover.json

It also adds utils. The app needs its setup first: Installation.

Usage

Popover holds PopoverTrigger and PopoverContent; PopoverHeader, PopoverTitle and PopoverDescription give the content a heading. The content brings its own portal and positioner in React, Vue, Svelte and Solid, and takes side, sideOffset, align and alignOffset (bottom and center by default); in Angular the template writes basePopoverPortal itself. Positioning, focus and outside clicks come from the headless Popover.

import {
  Popover,
  PopoverContent,
  PopoverDescription,
  PopoverHeader,
  PopoverTitle,
  PopoverTrigger,
} from '@/components/ui/popover'

Examples

Default

A title, a description and four dimension fields.

Its preview and code are at the top of the page.

API reference

The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Popover's API reference.