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

Popover

Pro

A small panel 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 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>/meadow-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 { PopoverAnchor, PopoverClose } from '@/components/ui/goop/popover';

import { Button } from '@/components/ui/goop/button';
import { Checkbox } from '@/components/ui/goop/checkbox';
import {
  Command,
  CommandInput,
  CommandItem,
  CommandList,
  CommandPopover,
  CommandPopoverContent,
  CommandPopoverTrigger,
} from '@/components/ui/goop/command';
import {
  Popover,
  PopoverContent,
  PopoverControl,
  PopoverGroup,
  PopoverLabel,
  PopoverRow,
  PopoverTitle,
  PopoverTrigger,
} from '@/components/ui/goop/popover';
import { useState } from 'react';

function CalendarFilter() {
  const [on, setOn] = useState(true);
  const mark = <Checkbox checked={on} tabIndex={-1} className="pointer-events-none" />;
  return (
    <CommandPopover>
      <CommandPopoverTrigger asChild><Button variant="outline">Calendars</Button></CommandPopoverTrigger>
      <CommandPopoverContent aria-label="Calendars" closeOnSelect={false} className="w-55">
        <Command label="Calendars">
          <CommandInput placeholder="Search" shortcut="O" />
          <CommandList>
            <CommandItem aria-checked={on} onSelect={() => setOn(!on)} mark={mark}>Field visits</CommandItem>
          </CommandList>
        </Command>
      </CommandPopoverContent>
    </CommandPopover>
  );
}

function ShareLinks({ onCopy, onCreate }: { onCopy(): void; onCreate(): void }) {
  return (
    <Popover>
      <PopoverTrigger asChild><Button>Share</Button></PopoverTrigger>
      <PopoverContent variant="menu" aria-labelledby="share" frameClassName="w-70">
        <PopoverTitle id="share">Share links</PopoverTitle>
        <PopoverGroup>
          <PopoverRow>
            <PopoverLabel>Ines visit</PopoverLabel>
            <PopoverControl><Button variant="ghost" onClick={onCopy}>Copy</Button></PopoverControl>
          </PopoverRow>
          <Button variant="success" size="row" className="w-full" onClick={onCreate}>Create link</Button>
        </PopoverGroup>
      </PopoverContent>
    </Popover>
  );
}
  • Fits: list, board: toolbar.
  • height, width, padding, gap, corner, border, background, 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=open
Parts
PartWhat it is
PopoverTriggerThe control that opens and closes the panel
PopoverAnchorWhat the panel is placed against when it is not its trigger (a field, a row); it adds no look of its own, and with asChild no element either
PopoverCloseWraps a control inside the panel that closes it, such as a Done button
PopoverContentThe panel the trigger opens (a dialog: name it with aria-label, or aria-labelledby pointing at its PopoverTitle), below its trigger at its start, 8 px off (side, align, sideOffset move it), in a portal — the end of <body>, or container
PopoverTitleThe panel's heading, its first child (an h2; asChild puts the look on the caller's own heading for another level)
PopoverGroupA section of the panel (a field, a list, a run of rows)
PopoverRowA row of a section
PopoverLabelThe words that name a row of the panel and the controls in it (as a group, and its one control)
PopoverControlThe row's controls, the theme's own components, in the order written (the tab order)
  • Class recipes (cva): popoverContentVariants (PopoverContent), popoverRowVariants (PopoverRow)

PopoverAnchor

What the panel is placed against when it is not its trigger (a field, a row); it adds no look of its own, and with asChild no element either.

TSX
import { PopoverAnchor } from '@/components/ui/goop/popover';

Options

  • Also takes: asChild?: boolean

PopoverClose

Wraps a control inside the panel that closes it, such as a Done button.

TSX
import { PopoverClose } from '@/components/ui/goop/popover';

Options

  • Also takes: asChild?: boolean

PopoverContent

The panel the trigger opens (a dialog: name it with aria-label, or aria-labelledby pointing at its PopoverTitle), below its trigger at its start, 8 px off (side, align, sideOffset move it), in a portal — the end of <body>, or container.

TSX
import { PopoverContent } from '@/components/ui/goop/popover';

Options

  • variant: default (default), menu
  • container?: HTMLElement | null — Where the panel is portalled; the end of <body> when left out.
  • frameClassName?: string — Classes added last on the 208 px column the children sit in, for a panel that needs another width.

PopoverControl

The row's controls, the theme's own components, in the order written (the tab order).

TSX
import { PopoverControl } from '@/components/ui/goop/popover';

Options

  • Also takes: asChild?: boolean

PopoverGroup

A section of the panel (a field, a list, a run of rows).

TSX
import { PopoverGroup } from '@/components/ui/goop/popover';

Options

  • Also takes: asChild?: boolean

PopoverLabel

The words that name a row of the panel and the controls in it (as a group, and its one control).

TSX
import { PopoverLabel } from '@/components/ui/goop/popover';

Options

  • Also takes: asChild?: boolean

PopoverRow

A row of a section.

TSX
import { PopoverRow } from '@/components/ui/goop/popover';

Options

  • orientation: horizontal (default), vertical
  • Also takes: asChild?: boolean

PopoverTitle

The panel's heading, its first child (an h2; asChild puts the look on the caller's own heading for another level).

TSX
import { PopoverTitle } from '@/components/ui/goop/popover';

Options

  • Also takes: asChild?: boolean

PopoverTrigger

The control that opens and closes the panel.

TSX
import { PopoverTrigger } from '@/components/ui/goop/popover';

Options

  • Also takes: asChild?: boolean

Keyboard

KeyWhat it does
EnterOn the trigger: open, the focus on the panel's first control
SpaceOn the trigger: open, the focus on the panel's first control
Tab Shift+TabMove through the panel's controls

Accessibility

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

Motion

  • The part sets its own motion: add no transition or animation of your own.

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/meadow/components/popover.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-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.