Popover

Markdown

A small panel that opens from a button and can hold controls.

Use it for
Interactive content anchored to a trigger, such as a small form or filter.
Not for
Short descriptions without controls, or focused tasks. Try Tooltip or Modal.

Popover preview

Open the panel to review its content.

Installation

npm install @stackunseen/ui
import { Popover } from '@stackunseen/ui';
Styles: @stackunseen/ui/styles.css

Parts

A small panel that opens from a button and can hold controls. Focus and closing on Escape or outside clicks are handled for you.

How the parts fit together

tsx
<Popover open={open} onOpenChange={setOpen}>
  <Popover.Trigger asChild>
    <Button variant="outline">Project details</Button>
  </Popover.Trigger>
  <Popover.Content title="Project details">
    {/* fields */}
    <Popover.Close asChild>
      <Button>Done</Button>
    </Popover.Close>
  </Popover.Content>
</Popover>
  1. Popover

    Holds the open state; leave it uncontrolled or pass open and onOpenChange.

  2. Popover.Trigger

    Opens it. Pass your own Button with asChild.

    Propsvariant size

  3. Popover.Content

    The panel; title is its heading.

    Propstitle description headingLevel container

  4. Popover.Close

    A button that closes it, such as Done.

  5. Popover.Arrow

    An optional pointer toward the trigger.

Usage and props

Keep whether it’s open, and any draft, in your app. Use it for short tasks; move longer ones into a dialog or a page.

Supported inputs

This is the public signature used by this example. Open Code to see how the values and callbacks fit together.

Root: open? · onOpenChange? · Content: title · description? · headingLevel? · Trigger/Close asChild?
How state and callbacks work
All props

Loading…

For your coding agent

Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.

Contract
Root: open? · onOpenChange? · Content: title · description? · headingLevel? · Trigger/Close asChild?
Keeps honest
Keep whether it’s open, and any draft, in your app. Use it for short tasks; move longer ones into a dialog or a page.
MCP
read_component "Popover" on the docs endpoint
Open the Markdown file

Keyboard and customization

Keyboard

Enter or Space opens the trigger. Focus moves into the panel; Escape closes it and returns focus.

Customization

Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio