Back to components
ElementData DisplayFree

List Group React component

A framed group of rows for settings menus and navigation lists: icons, descriptions, count badges, a danger row for destructive actions, and in selectable mode an active highlight that slides from row to row with arrow-key navigation.

About the List Group component

List Group is a framed list of rows for settings menus, account pages and panels. Each row can have an icon, a label with a second line under it, a count or short tag on the right and a chevron, and a danger tone marks destructive rows like Delete account in red. In single-selection mode one row stays active, with a highlight and a side bar that slide to the row you pick.

items takes objects with id, label and optional description, icon (one of eight built-in names such as user, bell, lock and card, or your own element), badge, href, disabled and tone. Rows with href render as links and the rest as buttons. selectable picks single or none, value or defaultValue with onValueChange track the active row, and onItemClick runs on every activation. variant picks bordered, inset or flush, and showChevron toggles the arrows.

When to use it

Use List Group for settings menus, account pages, sidebars inside panels and short lists of actions or links. Each row can carry an icon, a hint and a count, and the danger tone keeps destructive actions visibly apart.

Use single selection when the list switches what's shown next to it (like settings sections); use none when rows are links or one-off actions.

Installation

Add the List Group component to your project with the shadcn CLI. It lands in components/list-group.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/list-group

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

Related components

Basic Table
Free
Chat Bubble
Free
Blockquote
Free
Tree Table
Free
Transfer List
Free
Variant Swatches
Free