Item
A simplified wrapper for Shadcn Item with flexible option handling and automatic type conversion
Product
Wireless Headphones
Noise-cancelling over-ear headphones with long battery life.
Perfect for work, travel, and everyday listening. Supports fast charging.Updated 2 days ago
Smart Watch
Track your fitness, heart rate and notifications.
In Stock
Product
Wireless Headphones
Noise-cancelling over-ear headphones with long battery life.
Perfect for work, travel, and everyday listening. Supports fast charging.Updated 2 days ago
Installation
npx shadcn@latest add @glrk-ui/itemIf you haven't set up the prerequisites yet, check out registry setup.
Usage
Basic
import { ItemWrapper } from "@/components/ui/item"
import { Button } from "@/components/ui/button"
export function Basic() {
return (
<ItemWrapper
header="Product"
title="Wireless Headphones"
description="Noise-cancelling over-ear headphones with long battery life."
content="Perfect for work, travel, and everyday listening. Supports fast charging."
actions={<Button size="sm">Buy Now</Button>}
footer="Updated 2 days ago"
/>
)
}Item Group
import { type itemsT, ItemGroupWrapper } from "@/components/ui/item"
import { Button } from "@/components/ui/button"
export function Group() {
const items: itemsT = [
{
header: "Product",
title: "Wireless Headphones",
description: "Noise-cancelling over-ear headphones with long battery life.",
content: "Perfect for work, travel, and everyday listening. Supports fast charging.",
actions: <Button size="sm">Buy Now</Button>,
footer: "Updated 2 days ago",
itemProps: { variant: "outline" }
},
{
title: "Smart Watch",
description: "Track your fitness, heart rate and notifications.",
actions: <Button variant="outline" size="sm">View Details</Button>,
footer: "In Stock",
itemProps: { variant: "muted" }
},
]
return (
<ItemGroupWrapper
items={items}
/>
)
}Reference
ItemWrapper
Prop
Type
ItemGroupWrapper
Prop
Type