On this page

Item

Install, props and the parts Item is built from.

Install

Run this in the app, after shadcn-vue init and the Beehexa theme (Button › Code):

npx shadcn-vue@latest add https://beehexa.design/r/item.json

This also installs Separator, which ItemSeparator uses.

Use

<script setup lang="ts">
import { ShoppingCart } from '@lucide/vue'
import { Button } from '@/components/ui/button'
import { Item, ItemActions, ItemContent, ItemDescription, ItemMedia, ItemTitle } from '@/components/ui/item'
</script>

<template>
  <Item variant="outline">
    <ItemMedia variant="icon"><ShoppingCart aria-hidden="true" /></ItemMedia>
    <ItemContent>
      <ItemTitle>Online store</ItemTitle>
      <ItemDescription>Orders and customers, every 15 minutes</ItemDescription>
    </ItemContent>
    <ItemActions>
      <Button variant="outline" size="sm">Settings</Button>
    </ItemActions>
  </Item>
</template>

Props

Part Prop Values Notes
Item variant default, outline, muted
Item size default, sm, xs
Item as, as-child element or boolean Default div. as-child with an <a> makes the item a link
ItemMedia variant default, icon, image image takes the item’s size step

itemVariants and itemMediaVariants give the classes for other elements.

Built on

Plain elements and a reka-ui Primitive, with the shadcn-vue Item API. Beehexa adds the styles; a linked item hovers like a table row and takes the Button focus ring.