Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Item as Link for Svelte

Two link rows: Visit our documentation with a chevron, and External resource with an external-link icon.

UI library: Ark UI

Two rows that are links. Visit our documentation has a short description and a chevron. External resource has a short description and an external-link icon, and it opens in a new tab.

Make the whole row a link when the destination is the action. Keep a separate button, as on a Card, when the row also has other actions. On Svelte, Ark UI does not choose the destination.

Preview

Preview width

Installation

MCP · Pro
Make your AI a shadcn expert
Your agent installs components, builds pages and restyles your app from one prompt, in Claude Code, Cursor or VS Code.
Part of Pro

Anatomy

Item anatomy: root, media, title, description, actions

Usage

<div class="flex w-full max-w-md flex-col gap-4"><Item>{#snippet asChild(props)}<a {...props(/* <a> attributes; Ark types these as <div>'s */ { href: "#" } as never)}><ItemContent><ItemTitle>Visit our documentation</ItemTitle><ItemDescription>Learn how to get started with our components.</ItemDescription></ItemContent><ItemActions><ChevronRightIcon aria-hidden="true" class="size-4" /></ItemActions></a>{/snippet}</Item><Item class="bg-background" variant="outline">{#snippet asChild(props)}<a {...props(/* <a> attributes; Ark types these as <div>'s */ { href: "#", rel: "noopener noreferrer", target: "_blank" } as never)}><ItemContent><ItemTitle>External resource</ItemTitle><ItemDescription>Opens in a new tab with security attributes.</ItemDescription></ItemContent><ItemActions><ExternalLinkIcon aria-hidden="true" class="size-4" /></ItemActions></a>{/snippet}</Item></div>

FAQ

API Reference

Item

Sets variant="outline". The rest is on the Item page.