List Item

A flexible list row with leading and trailing slots around a truncated heading and description, split by hairline borders. Build settings or contact lists.

src/registry/ui/list-item.tsx/r/list-item.json

Installation#

bash
npx shadcn@latest add @minidev/list-item

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/list-item.json

Usage#

tsx
import { ListItem } from "@/components/ui/list-item"

export function Example() {
  return <ListItem />
}

API reference#

ListItem props
PropTypeDefault
heading*React.ReactNode-
descriptionReact.ReactNode-
leadingReact.ReactNode-
trailingReact.ReactNode-

Also accepts every prop of <div>, passed through to the root element.

* required

All layout components