Select base theme

Select color scheme

Toggle dark mode

GitHub repository

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

Transparent background with no border.

Outline Variant

Outlined style with a visible border.

Muted Variant

Muted background 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

Use the ItemMedia avatar variant to display an 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 image.

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

Valeria Reverdo on Unsplash

v0-1.5-sm

Everyday tasks and UI generation.

v0-1.5-lg

Michael Oeser on Unsplash

v0-1.5-lg

Advanced thinking or reasoning.

v0-2.0-mini

Cherry Laithang on Unsplash

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

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

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

A container that groups related items together with consistent styling.

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.

Custom Attributes
NameTypeDefaultDescription
orientationString"horizontal"

Specify the orientation of the separator. Accepted values: "vertical" | "horizontal".

Implements global attributes.