Item

A versatile component for displaying content with media, title, description, and actions.

Basic Item

A simple item with title and description.

Your profile has been verified.

Variants

Use the variant prop to change the visual style of the item.

Default Variant

Standard styling with subtle background and borders.

Outline Variant

Outlined style with clear borders and transparent background.

Muted Variant

Subdued appearance with muted colors for secondary content.

Size

Use the size prop to change the size of the item. Available sizes are default, sm, and xs.

Default Size

The standard size for most use cases.

Small Size

A compact size for dense layouts.

Extra Small Size

The most compact size available.

Icon

Use the ItemMedia icon variant to display an icon.

Security Alert

New login detected from unknown device.

Avatar

ER
Evil Rabbit

Last seen 5 months ago

CNLRER
No Team Members

Invite your team to collaborate on this project.

Image

Use the ItemMedia image variant to display an icon.

Group

Use ItemGroup to group related items together.

SH
shadcn

shadcn@vercel.com

MA
maxleiter

maxleiter@vercel.com

EV
evilrabbit

evilrabbit@vercel.com

Header

Use ItemHeader to add a header above the item content.

v0-1.5-sm
v0-1.5-sm

Everyday tasks and UI generation.

v0-1.5-lg
v0-1.5-lg

Advanced thinking or reasoning.

v0-2.0-mini
v0-2.0-mini

Open Source model for everyone.

Link

To make an Item a link, just wrap it with an anchor and it'll automatically apply hover and focus styling.

Dropdown

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;
use singlestage::*;

#[component]
pub fn ItemAnatomy() -> impl IntoView {
    view! {
        <ItemGroup>
            <Item>
                <ItemMedia />
                <ItemHeader />
                <ItemContent>
                    <ItemTitle />
                    <ItemDescription />
                </ItemContent>
                <ItemActions>
                    <Button />
                </ItemActions>
                <ItemFooter />
            </Item>
            <ItemSeparator />
        </ItemGroup>
    }
}

API Reference

Item

Contains the contents of an Item.

Custom Attributes
NameTypeDefaultDescription
sizeString""

Set the display size of the Item. Accepted values: "outline" | "muted".

variantString""

Set the display variant of the Item. Accepted values: "outline" | "muted".

Implements global attributes.

ItemActions

Contains the actionable section of an Item.

Implements global attributes.

ItemContent

Contains the content section of an Item.

Implements global attributes.

ItemDescription

Contains description text for an Item.

Implements global attributes.

ItemFooter

Contains footer content for an Item.

Implements global attributes.

ItemGroup

Groups content together for display within an Item.

Implements global attributes.

ItemHeader

Contains header content for an Item.

Implements global attributes.

ItemMedia

Contains media content such as an icon or image for an Item.

Custom Attributes
NameTypeDefaultDescription
variantString""

Set the display variant of the ItemMedia. Accepted values: "icon" | "image".

Implements global attributes.

ItemSeparator

Visual divider to separate sections inside an Item. Accepts optional inline content.

Implements global attributes.

ItemTitle

Contains title text for an Item.

Implements global attributes.