Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-popover.json --yes

Popover

Pro

A small panel of settings that opens from its button and floats over the page, which stays usable under it, for React and Tailwind CSS. Part of Goop Pro.

Open Display and change how the task list shows: order by due date or title, show finished tasks, show or hide owners. Every change shows at once behind it; Escape or a click outside closes it. The tasks are our own sample, held in the page.

When to use

  • A small panel of settings that opens from its button and floats over the page, which stays usable under it.
  • Also called: popup or flyout.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Popover on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-popover.json --yes
PROMPT
Add the Goop Popover to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { Popover, PopoverTrigger, PopoverAnchor, PopoverClose, PopoverContent, PopoverGroup, PopoverRow, PopoverLabel, PopoverControl } from '@/components/ui/goop/popover';
import { Button } from '@/components/ui/goop/button';
import { Switch } from '@/components/ui/goop/switch';

<Popover>
  <PopoverTrigger asChild>
    <Button variant="outline">Display</Button>
  </PopoverTrigger>
  <PopoverContent aria-label="Display options">
    <PopoverGroup>
      <PopoverRow>
        <PopoverLabel>Show finished notes</PopoverLabel>
        <PopoverControl>
          <Switch defaultChecked />
        </PopoverControl>
      </PopoverRow>
    </PopoverGroup>
  </PopoverContent>
</Popover>
  • Fits: list, board: toolbar.
  • height, width, padding, gap, corner, border, background, shadow, text, motion: add no class for these.

API reference

Options
OptionTypeWhat it does
open?boolean
defaultOpen?boolean
onOpenChange?(open: boolean) => void
modal?boolean
  • State: open (open / defaultOpen / onOpenChange); drawn by data-state=closed
Parts
PartWhat it is
PopoverTriggerThe control that opens and closes the panel; takes asChild
PopoverAnchorWhat the panel is placed against when it is not its trigger (a field, a row); takes asChild
PopoverCloseWraps a control inside the panel that closes it, such as a Done button; takes asChild
PopoverContentThe panel the trigger opens, holding the popover's rows and controls; name it with aria-label; container?: HTMLElement | null — Where the panel is portalled; the end of <body> when left out; frameClassName?: string — Classes on the 300 px frame the children sit in, for another width
PopoverGroupA section of the panel; takes asChild
PopoverRowA row of the panel; orientation: horizontal (default), vertical; takes asChild
PopoverLabelThe words that name a row of the panel and the controls in that row; takes asChild
PopoverControlThe row's controls, the theme's own components; takes asChild
  • Class recipes (cva): popoverRowVariants (PopoverRow)
  • data-slot values (to select a part by): popover, popover-anchor, popover-close, popover-content, popover-control, popover-frame, popover-group, popover-label, popover-row, popover-trigger

Accessibility

  • The behaviour layer under the part answers keys, focus and dismissal: never write your own.

Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:

StateDrawn by
expandedthe attribute data-state=closed
openthe attribute data-state=closed

Motion

  • The part sets its own motion: add no transition or animation of your own.
  • How the theme moves, and how to move your own parts the same way: Motion.

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/trail/components/popover.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-popover.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.