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

List group

Pro

A group of a list's rows under a header bar with its name and count that folds open and closed, such as to-dos by project, for React and Tailwind CSS. Part of Goop Pro.

In the default look, fold and unfold each group by its header (click, Enter or Space); tick a task and it moves into Done, the counts following. Done starts folded: open it and untick one to send it back. The plus on Today or This week (or C while the focus is in the group) adds a task there, said under the groups. Look draws every other look the theme’s docs stage shows: on Trail the issue groups, the members bar (variant compact) and the settings bar (variant section), the issue groups folding by their caret; on Meadow the bar alone and folded, over its rows, compact, section and tinted, the to-do column, the narrow column, the list’s title, the busy count and the page edge. The tasks are our own sample, held in the page; an added task is a numbered placeholder.

When to use

  • A group of a list's rows under a header bar with its name and count that folds open and closed, such as to-dos by project.

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 List group 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-list-group.json --yes
PROMPT
Add the Goop List group to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { Badge } from '@/components/ui/goop/badge';
import { Checkbox } from '@/components/ui/goop/checkbox';
import { Item, ItemContent, ItemControl, ItemEnd, ItemOverlay, ItemTitle } from '@/components/ui/goop/item';
import {
  ListGroup,
  ListGroupAction,
  ListGroupContent,
  ListGroupCount,
  ListGroupHeader,
  ListGroupTitle,
} from '@/components/ui/goop/list-group';

const TODOS = [
  { title: 'Book the ferry for the crew', due: 'Dec 4' },
  { title: 'Send the permit to the office', due: 'Dec 1' },
];

function TodoRow({ title, due }: { title: string; due: string }) {
  return (
    <Item variant="todo">
      <ItemOverlay aria-label={title} onClick={() => {}} />
      <ItemControl reveal={false}>
        <Checkbox aria-label={title} />
      </ItemControl>
      <ItemContent>
        <ItemTitle>{title}</ItemTitle>
      </ItemContent>
      <ItemEnd>
        <Badge variant="flag">{due}</Badge>
      </ItemEnd>
    </Item>
  );
}

function TodayGroup({ onAdd }: { onAdd: () => void }) {
  return (
    <ListGroup collapsible caretLabel="Fold Today" onAdd={onAdd} createShortcut>
      <ListGroupHeader sticky action={<ListGroupAction icon="plus" aria-label="Add a to-do" />}>
        <ListGroupTitle>Today</ListGroupTitle>
        <ListGroupCount tabIndex={-1}>{TODOS.length}</ListGroupCount>
      </ListGroupHeader>
      <ListGroupContent>
        {TODOS.map((todo) => (
          <TodoRow key={todo.title} {...todo} />
        ))}
      </ListGroupContent>
    </ListGroup>
  );
}
  • Fits: list, overview (their recipes); list, inbox: collection.
  • ListGroupHeader: When to use it: a bar between groups of ONE list's rows, where the list is split by a key (a project, a status, a day) — two groups or more. Never use the bar as a page's or a card's title, nor over a single group whose heading already says what the rows are: there the heading is the page's (PageHeader) or the card's and the rows follow it with no bar. The one exception is variant="title": in a column that shows one list at a time, it names that list over its rows, once, with the group's own bars under it.
  • height, width, padding, gap, corner, background, text, motion: add no class for these.

API reference

  • Each option with its sentence: list-group--options.md
  • State: open (open / defaultOpen / onOpenChange); drawn by data-state=closed
Parts
PartWhat it is
ListGroupHeaderThe bar over a group's rows; it holds a ListGroupTitle, a ListGroupCount and an optional action; its props: list-group--header.md
ListGroupTitleThe group's name as a heading, first in ListGroupHeader, on one line cut with an ellipsis; takes asChild
ListGroupCountThe number of rows in the group, after ListGroupTitle; pass the number as its children; its props: list-group--count.md
ListGroupActionThe bar's trailing action; its props: list-group--action.md
ListGroupContentThe group's rows, under its bar
  • Class recipes (cva): listGroupHeaderVariants (ListGroupHeader)
  • data-slot values (to select a part by): list-group, list-group-actions, list-group-button, list-group-content, list-group-count-spinner, list-group-end, list-group-frame, list-group-header, list-group-icon, list-group-indicator, list-group-text, list-group-title, list-group-trigger

ListGroupAction

The bar's trailing action.

TSX
import { ListGroupAction } from '@/components/ui/goop/list-group';

Options

  • icon: IconName — The glyph, by the pack's name: the bar's plus is plus.
  • Also takes: type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean; aria-label: string; tooltip?: string | false; tooltipKeys?: readonly string[]; loading?: boolean = false; loadingLabel?: string = 'Loading'

ListGroupCount

The number of rows in the group, after ListGroupTitle; pass the number as its children.

TSX
import { ListGroupCount } from '@/components/ui/goop/list-group';

Options

  • loading?: boolean = false — The count is being worked out: the spinner over it, and no press reaches onClick; it keeps the focus.
  • loadingLabel?: string = 'Loading' — What a reader hears beside the count while loading (default "Loading").
  • Also takes: asChild?: boolean; type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean

ListGroup: every option

TSX
import { ListGroup } from '@/components/ui/goop/list-group';

Options

  • gutter?: 'page' — page: on a list page, the rows start on the page's title edge (the 40 px gutter), the caret hung in the gutter before them; give it to every group of the page.
  • onAdd?: () => void — Opens the group's create row: called by the bar's ListGroupAction (with no onClick of its own) and the C key.
  • createRow?: ReactNode — The group's create row, drawn first in its rows (it draws nothing while closed).
  • createShortcut?: boolean = false — C (no modifier, outside a text field) while the focus is in the group calls onAdd.
  • collapsible?: true | false — Fold the rows from the bar's caret, in every look of the bar. Or: A group that does not fold: no caret, its rows always shown.
  • caretLabel?: string — The caret's name, in the caller's words (a glyph-only control).
  • defaultOpen?: boolean = true — Whether the rows show at first, left to the group (open unless false).
  • open?: boolean — Whether the rows show, held by the caller with onOpenChange.
  • onOpenChange?: (open: boolean) => void — Called with the rows' new state when the caret folds or unfolds them.
  • State: open (open / defaultOpen / onOpenChange); drawn by data-state=closed

Keyboard

KeyWhat it does
EnterActivate
SpaceActivate

Accessibility

  • The behaviour layer under the part answers keys, focus and dismissal: never write your own.
  • hover, active, focus, focus-visible, focus-within: the browser's own (:hover, :active, :focus, :focus-visible, :focus-within): write nothing

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.

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