GitHub Stars

Item

A flexible container for displaying content items with various styles.

Item Title

Item description goes here

Outline Variant

This item has an outline variant

Muted Variant

This item has a muted variant

Installation

npx shadcn@latest add @fulldev/item

Usage

import {
  Item,
  ItemContent,
  ItemDescription,
  ItemMedia,
  ItemTitle,
} from "@/components/ui/item"
---
import Heart from "@lucide/astro/icons/heart"
---

<Item>
  <ItemMedia>
    <Heart />
  </ItemMedia>
  <ItemContent>
    <ItemTitle>Title</ItemTitle>
    <ItemDescription>Description</ItemDescription>
  </ItemContent>
</Item>

Composition

Use the following composition to build an Item:

ItemGroup
└── Item
    ├── ItemHeader
    ├── ItemMedia
    ├── ItemContent
    │   ├── ItemTitle
    │   └── ItemDescription
    ├── ItemActions
    └── ItemFooter

Notes

  • Use ItemContent to group the title and description instead of hand-rolled wrappers.
  • Passing href turns the root Item into an anchor, which works well for list rows and navigational cards.
  • Use variants for emphasis changes before adding custom surface styles.

API Reference

See the GitHub source code for more information on props.