Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-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 issues by status, 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 issues by status.

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>/trail-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 { ListGroup, ListGroupHeader, ListGroupTitle, ListGroupCount, ListGroupAction, ListGroupContent } from '@/components/ui/goop/list-group';
import { Item, ItemContent, ItemTitle } from '@/components/ui/goop/item';

<ListGroup>
  <ListGroupHeader variant="section">
    <ListGroupTitle>This week</ListGroupTitle>
    <ListGroupCount>2</ListGroupCount>
  </ListGroupHeader>
  <ListGroupContent>
    <Item>
      <ItemContent>
        <ItemTitle>Plan the launch</ItemTitle>
      </ItemContent>
    </Item>
    <Item>
      <ItemContent>
        <ItemTitle>Write the release notes</ItemTitle>
      </ItemContent>
    </Item>
  </ListGroupContent>
</ListGroup>
  • Fits: list, inbox: collection.
  • ListGroupHeader: When to use it: a grey bar between groups of ONE list's rows, where the list is split by a key (a status, a role, a time of day) — two groups or more. Records grouped by a key take compact (a label and its count) or the default (a status with its mark); section is a settings list's heading, a title and an action. 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 (CardHeader) and the rows follow it with no bar. A heading over a whole block inside a page (a table, a list, a group of cards), with its count, description and buttons, is SectionHeader, not this bar.
  • height, width, padding, gap, corner, border, background, text: 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; also takes type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean; loading?: boolean = false; loadingLabel?: string = 'Loading'
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-content, list-group-end, list-group-header, list-group-icon, list-group-inset, 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'

ListGroup: every option

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

Options

  • gutter?: 'page' — page: on a list page, the bars and rows start on the page's title edge (the 24 px gutter); give it to every group of the page.
  • onAdd?: () => void — Opens the group's create row: called by the bar's ListGroupAction and the C key.
  • createRow?: ReactNode — The group's CreateRow, first in its rows.
  • createShortcut?: boolean = false — C (outside a text field) while the focus is in the group calls onAdd.
  • collapsible?: true | false — Fold the rows from a caret at the bar's start. 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

Accessibility

  • The behaviour layer under the part answers keys, focus and dismissal: never write your own.
  • hover, active, focus-visible, focus-within: the browser's own (:hover, :active, :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
disabledthe prop disabled

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