Ballmac UI home

Popover

A focus-managed compact surface for controls or details, with collision handling, mobile-safe width, and optional close action.

Project access

Team only

Installation

$ pnpm dlx shadcn@latest add @ballmac/popover

Usage

import { Popover, PopoverTrigger, PopoverAnchor, PopoverContent, PopoverHeader, PopoverTitle, PopoverDescription } from "@/components/ballmac/popover"

The full example is in the Code tab above.

Examples

Profile details

API reference

PropTypeDefault
label*

Accessible name of the interactive panel.

string—
showCloseButton

Show the close control in the top-right corner.

booleanfalse
closeLabel

Accessible name for the close control.

string—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Enter / SpaceOpens the panel from its trigger
Tab / Shift+TabMoves among panel controls
EscapeCloses and returns focus to the trigger

Use with AI

Displays a small interactive panel anchored to a control, with managed focus and Escape dismissal. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Popover (@ballmac/popover) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Inline editors and compact preferences
  • Actions needing more room than a menu

Not for

  • Long or critical forms; use dialog
  • Noninteractive link previews; use hover-card

Registry JSON: https://ui.ballmac.com/r/popover.json

Credits

Free to use in personal and commercial projects.