Skip to content

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

Free

Item as Link for Ark UI

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

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 React, Ark UI does not choose the destination.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.
Use email insteadNo credit card

Anatomy

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

Usage

<div className="flex w-full max-w-md flex-col gap-4">
  <Item asChild>
    <a href="#">
      <ItemContent>
        <ItemTitle>Visit our documentation</ItemTitle>
        <ItemDescription>
          Learn how to get started with our components.
        </ItemDescription>
      </ItemContent>
      <ItemActions>
        <ChevronRightIcon aria-hidden="true" className="size-4" />
      </ItemActions>
    </a>
  </Item>
  <Item asChild className="bg-background" variant="outline">
    <a href="#" rel="noopener noreferrer" target="_blank">
      <ItemContent>
        <ItemTitle>External resource</ItemTitle>
        <ItemDescription>
          Opens in a new tab with security attributes.
        </ItemDescription>
      </ItemContent>
      <ItemActions>
        <ExternalLinkIcon aria-hidden="true" className="size-4" />
      </ItemActions>
    </a>
  </Item>
</div>

FAQ

API Reference

Item

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