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.
Without the namespace, install straight from the URL:
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.
Links and router links
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
ListGroupItem props: