About
A flexible flex container for displaying content with media, a title, a description and actions, used to build lists of people, notifications, links or settings rows.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Item to your project and fits it to your theme.
Code
How Item is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import {
Item,
ItemActions,
ItemContent,
ItemDescription,
ItemGroup,
ItemMedia,
ItemTitle,
} from "@/components/ui/item";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { Button } from "@/components/ui/button";
import { PlusIcon } from "lucide-react";
const people = [
{
username: "علی رضایی",
avatar:
"https://cdn.21st.dev/assets/localized/513d06f542692036ff0bb17938f04b3efd60567ba2cae08049469d21f18e0524.jpg",
email: "ali@example.com",
},
{
username: "سارا محمدی",
avatar:
"https://cdn.21st.dev/assets/localized/3a31d3d0c3bb2074929755298773d14e53048a8a85abbc0c944fb19fc65106bf.png",
email: "sara@example.com",
},
{
username: "رضا کریمی",
avatar:
"https://cdn.21st.dev/assets/localized/8dcdb391f1f8f6610d31a9a3e06733fec308be75732571ccc6d5ce634c695382.png",
email: "reza@example.com",
},
];
export default function ItemGroupExample() {
return (
<ItemGroup dir="rtl" className="max-w-sm">
{people.map((person) => (
<Item key={person.email} variant="outline">
<ItemMedia>
<Avatar>
<AvatarImage src={person.avatar} className="grayscale" />
<AvatarFallback>{person.username.charAt(0)}</AvatarFallback>
</Avatar>
</ItemMedia>
<ItemContent className="gap-1 text-start">
<ItemTitle>{person.username}</ItemTitle>
<ItemDescription>{person.email}</ItemDescription>
</ItemContent>
<ItemActions>
<Button variant="ghost" size="icon" className="rounded-full">
<PlusIcon />
</Button>
</ItemActions>
</Item>
))}
</ItemGroup>
);
}







