Skip to content
GitHub11 stars

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.
<div class="flex w-full max-w-md flex-col gap-6">
    <Item Variant="ItemVariant.Outline">
        <ItemContent>

The Item component is a straightforward flex container that can house nearly any type of content. Use it to display a title, description, and actions. Group it with the ItemGroup component to create a list of items.

Installation

dnx Blazix.Cli add item

Usage

<Item>
    <ItemMedia Variant="ItemMediaVariant.Icon">
        <Icon Data="LucideIcons.Inbox" />
    </ItemMedia>
    <ItemContent>
        <ItemTitle>Title</ItemTitle>
        <ItemDescription>Description</ItemDescription>
    </ItemContent>
    <ItemActions>
        <Button>Action</Button>
    </ItemActions>
</Item>

Composition

Use the following composition to build an Item:

ItemGroup
└── Item
    ├── ItemHeader
    ├── ItemMedia
    ├── ItemContent
    │   ├── ItemTitle
    │   └── ItemDescription
    ├── ItemActions
    └── ItemFooter

Item vs Field

Use Field if you need to display a form input such as a checkbox, input, radio, or select.

If you only need to display content such as a title, description, and actions, use Item.

Variant

Use the Variant parameter 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.

<div class="flex w-full max-w-md flex-col gap-6">
    <Item>
        <ItemMedia Variant="ItemMediaVariant.Icon"><Icon Data="LucideIcons.Inbox" /></ItemMedia>

Size

Use the Size parameter 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.

<div class="flex w-full max-w-md flex-col gap-6">
    <Item Variant="ItemVariant.Outline">
        <ItemMedia Variant="ItemMediaVariant.Icon"><Icon Data="LucideIcons.Inbox" /></ItemMedia>

Icon

Use ItemMedia with variant="icon" to display an icon.

Security Alert

New login detected from unknown device.

<div class="flex w-full max-w-lg flex-col gap-6">
    <Item Variant="ItemVariant.Outline">
        <ItemMedia Variant="ItemMediaVariant.Icon"><Icon Data="LucideIcons.ShieldAlert" /></ItemMedia>

Avatar

You can use ItemMedia with variant="avatar" to display an avatar.

ER
Evil Rabbit

Last seen 5 months ago

ER
No Team Members

Invite your team to collaborate on this project.

<div class="flex w-full max-w-lg flex-col gap-6">
    <Item Variant="ItemVariant.Outline">
        <ItemMedia>

Image

Use ItemMedia with variant="image" to display an image.

<div class="flex w-full max-w-md flex-col gap-6">
    <ItemGroup Class="gap-4">
        @foreach (var song in Music)

Group

Use ItemGroup to group related items together.

b
blazix

blazix@example.com

m
maxleiter

maxleiter@vercel.com

e
evilrabbit

evilrabbit@vercel.com

<ItemGroup Class="max-w-sm">
    @foreach (var person in People)
    {

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.

<div class="flex w-full max-w-xl flex-col gap-6">
    <ItemGroup Class="grid grid-cols-3 gap-4">
        @foreach (var model in Models)

Use the Render parameter to render the item as a link. The hover and focus states will be applied to the anchor element.

<Item>
    <Render>
        <a @attributes="context.Attributes" href="/dashboard">
            <ItemMedia Variant="ItemMediaVariant.Icon"><Icon Data="LucideIcons.Home" /></ItemMedia>
            <ItemContent>
                <ItemTitle>Dashboard</ItemTitle>
                <ItemDescription>Overview of your account and activity.</ItemDescription>
            </ItemContent>
        </a>
    </Render>
</Item>
<DropdownMenu>
    <DropdownMenuTrigger>
        Select <Icon Data="LucideIcons.ChevronDown" />

RTL

To enable RTL support in Blazix, see the RTL configuration guide.

Translated with AI for the demo, so it may have mistakes.

عنصر أساسي

عنصر بسيط يحتوي على عنوان ووصف.

تم التحقق من ملفك الشخصي.
<div class="flex w-full max-w-md flex-col gap-6">
    <Item Variant="ItemVariant.Outline">
        <ItemContent>

API Reference

Item

ParameterTypeDefault
Render RenderFragment<UseRenderProps>? -
Variant ItemVariant ItemVariant.Default
Size ItemSize ItemSize.Default
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

ItemActions

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

ItemContent

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

ItemDescription

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

ItemFooter

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

ItemGroup

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

ItemHeader

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

ItemMedia

ParameterTypeDefault
Variant ItemMediaVariant ItemMediaVariant.Default
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

ItemSeparator

ParameterTypeDefault
Class string? -

Other attributes are passed to the element it renders.

ItemTitle

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.