Item
NewA row that groups media, text, and actions.
Preview
Installation
npx sigma-ui@latest add itemUsage
<script setup lang="ts">
import { Item, ItemContent, ItemDescription, ItemMedia, ItemTitle } from '@/components/ui/item';
</script>
<template>
<Item variant="outline">
<ItemMedia variant="icon">
<ShieldIcon />
</ItemMedia>
<ItemContent>
<ItemTitle>Security</ItemTitle>
<ItemDescription>Manage how you sign in.</ItemDescription>
</ItemContent>
</Item>
</template>variant is default, outline, or muted. size is default or sm. Render the row as a link with as or as-child.
ItemMediaframes an icon or an image.ItemActionsholds buttons.ItemHeaderandItemFooterspan the full width of the row.ItemGroupstacks rows. Divide them withItemSeparator.
Examples
Group
API Reference
Item
Props
| Prop | Type | Default |
|---|---|---|
variantSurface of the row. | "default" | "outline" | "muted" | null | "default" |
sizePadding and gap of the row. | "default" | "sm" | null | "default" |
asChildChange the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. | boolean | - |
asThe element or component this component should render as. Can be overwritten by | AsTag | Component | "div" |
Slots
| Slot | Scope |
|---|---|
defaultMedia, content, and actions for one row. | - |
ItemActions
Slots
| Slot | Scope |
|---|---|
defaultButtons or other controls at the end of the row. | - |
ItemContent
Slots
| Slot | Scope |
|---|---|
defaultTitle and description. | - |
ItemDescription
Slots
| Slot | Scope |
|---|---|
defaultSecondary text. Links inside it are underlined. | - |
ItemFooter
Slots
| Slot | Scope |
|---|---|
defaultContent that spans the full width under the row body. | - |
ItemGroup
Slots
| Slot | Scope |
|---|---|
default
| - |
ItemHeader
Slots
| Slot | Scope |
|---|---|
defaultContent that spans the full width above the row body. | - |
ItemMedia
Props
| Prop | Type | Default |
|---|---|---|
variant
| "default" | "icon" | "image" | null | - |
Slots
| Slot | Scope |
|---|---|
defaultIcon or image. | - |
ItemSeparator
Props
| Prop | Type | Default |
|---|---|---|
orientationOrientation of the component. Either | DataOrientation | "horizontal" |
decorativeWhether or not the component is purely decorative. <br>When | boolean | - |
asChildChange the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. | boolean | - |
asThe element or component this component should render as. Can be overwritten by | AsTag | Component | "div" |
ItemTitle
Slots
| Slot | Scope |
|---|---|
defaultPrimary text of the row. | - |
Accessibility
ItemGroup renders role="list". When a row navigates, render it as a link. Actions inside the row stay buttons.
| Key | Description |
|---|---|
| Tab | Moves focus to a link row or to an action inside the row. |
| Enter | Activates the focused link or button. |