Skip to content

Components

Item

A row with media, a title, a description and actions.

Customize
Ombelle · light

Installation

Run in a project initialized with an Ombelle preset (see Get started). The component uses the saved project preset. Run the command from your app folder; it shows the changes and asks before writing.

pnpm dlx @ombelle-ui/cli@1.1.2 add item

Adds components/ui/item.tsx and installs react, clsx, tailwind-merge with lifecycle scripts disabled.

In a liquid glass project the plan adds a notice that accessibility is not guaranteed, because text contrast depends on the background behind the glass.

Usage

example.tsx
import { Item, ItemGroup, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions } from '@/components/ui/item'
export function Example(){return <ItemGroup aria-label="Presets"><Item variant="outline"><ItemMedia variant="icon" aria-hidden="true">O</ItemMedia><ItemContent><ItemTitle>Ombelle</ItemTitle><ItemDescription>Built-in · stable in light and dark</ItemDescription></ItemContent><ItemActions><button type="button">Apply</button></ItemActions></Item><Item variant="muted" asChild><a href="/presets/studio-warm"><ItemContent><ItemTitle>Studio warm</ItemTitle><ItemDescription>Your preset · edited 2 h ago</ItemDescription></ItemContent></a></Item></ItemGroup>}

API and states

API
Item (variant default, outline or muted, size default or sm, asChild), ItemMedia (variant icon or image), ItemContent, ItemTitle, ItemDescription, ItemActions, ItemGroup, ItemSeparator
Minimum states
Default, hover and focus when a link, with actions
Native basis
Native div, or a link through asChild
Styles
Stable in Ombelle, Papier, Organic, Retro futurism, minimalist, neo-brutalism and flat, light and dark. Liquid glass: stable, accessibility not guaranteed.