Skip to content

List Group

An iPhone OS grouped table view: white rounded sections on a pinstripe background with 44px rows, engraved section headers, disclosure chevrons and a blue gradient pressed row.

Installation

Requires the theme. Register the @skeuomorph namespace and add @skeuomorph/skeuomorph first, as shown in the installation guide. The CLI also pulls it in as a dependency.

pnpm dlx shadcn@latest add @skeuomorph/list-group

Without the namespace, install straight from the URL:

pnpm dlx shadcn@latest add https://ui-skeuomorph.vercel.app/r/list-group.json

Usage

import {
  ListGroup,
  ListGroupHeader,
  ListGroupItem,
  ListGroupSection,
} from "@/components/ui/list-group"
<ListGroup>
  <ListGroupHeader>General</ListGroupHeader>
  <ListGroupSection>
    <ListGroupItem disclosure detail="On">
      Wi-Fi
    </ListGroupItem>
    <ListGroupItem disclosure badge={3}>
      Software Update
    </ListGroupItem>
  </ListGroupSection>
</ListGroup>

Examples

Pinstripe

ListGroup is transparent by default so it can sit on your own surface. variant="pinstripe" draws the classic blue-grey pinstripes behind the sections and variant="pinstripe-ios6" the later, finer texture. ListGroupFooter adds the centred explanatory text under a section.

Give a row href to render it as a link, or asChild to merge it onto your router's link component. Mark the current row with selected.

<ListGroupItem href="/settings/wifi" disclosure detail="On">
  Wi-Fi
</ListGroupItem>
 
<ListGroupItem asChild disclosure selected={pathname === "/settings/sounds"}>
  <Link href="/settings/sounds">Sounds</Link>
</ListGroupItem>

API

ComponentProps
ListGroupEvery div prop plus variant?: "plain" | "pinstripe" | "pinstripe-ios6" (default "plain").
ListGroupSectionEvery div prop. The rounded white section.
ListGroupHeaderEvery h3 prop plus asChild to use a different heading level.
ListGroupFooterEvery div prop. Centred text under a section.
ListGroupItemEvery div prop plus the props below.
ListGroupDividerEvery hr prop plus inset?: boolean (default true).
ListGroupItemLabelEvery span prop. Bold first line of a two-line row.
ListGroupItemSubtitleEvery span prop. Grey second line.

ListGroupItem props:

PropTypeDescription
iconReactNodeLeading icon, like a Settings app icon.
detailstringRight-aligned value text, e.g. "On".
badgestring | numberRed count badge before the chevron.
disclosurebooleanShows the disclosure chevron.
onPress() => voidRenders the row as a button and calls this when activated.
hrefstringRenders the row as a link.
asChildbooleanMerges the row onto its single child, e.g. a router Link.
selectedbooleanPersistent selection. Sets aria-pressed on buttons, aria-current on links.
disabledbooleanDims the row and blocks pointer and keyboard activation.
interactivebooleanSet to false to render a static row even with onPress or href.