A row of media, text and actions for lists, settings and pickers, with a grouped surface and a hover highlight that glides between rows.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
npm packages it adds
- cn
- @base-ui/react
- @tabler/icons-react
- class-variance-authority
Code
import {
IconBell,
IconDeviceDesktop,
IconKey,
IconUserCircle,
} from "@tabler/icons-react"
import {
Item,
ItemChevron,
ItemContent,
ItemDescription,
ItemGroup,
ItemMedia,
ItemTitle,
type ItemMediaTone,
} from "@/components/ui/item"
const settings: {
href: string
icon: typeof IconBell
title: string
tone: ItemMediaTone
description: string
}[] = [
{
href: "#profile",
icon: IconUserCircle,
title: "Profile",
tone: "gray",
description: "Name, photo and handle",
},
{
href: "#notifications",
icon: IconBell,
title: "Notifications",
tone: "red",
description: "Mentions, replies and digests",
},
{
href: "#security",
icon: IconKey,
title: "Password and passkeys",
tone: "green",
description: "Two passkeys, last used today",
},
{
href: "#sessions",
icon: IconDeviceDesktop,
title: "Sessions",
tone: "blue",
description: "Signed in on 3 devices",
},
]
export function ItemDemo() {
return (
<ItemGroup variant="grouped" className="max-w-sm">
{settings.map((setting) => (
<Item key={setting.href} size="sm" render={<a href={setting.href} />}>
<ItemMedia variant="icon" tone={setting.tone}>
<setting.icon />
</ItemMedia>
<ItemContent>
<ItemTitle>{setting.title}</ItemTitle>
<ItemDescription>{setting.description}</ItemDescription>
</ItemContent>
<ItemChevron />
</Item>
))}
</ItemGroup>
)
}
































