Item

A flexible composition primitive for compact product content, media, metadata, and independent actions.

Overview and decision boundary

Use Item to compose a compact content unit with optional media, metadata, and actions without forcing list semantics or interaction.

Do not use for Field-controlled form options, selectable listboxes, data tables, or a product-specific activity feed.

Research brief

Updated today · 12 collaborators have access.

import { FileText } from "@nerio-ui/adapters/icons";import { Item, ItemActions, ItemContent, ItemDescription, ItemMedia, ItemTitle } from "@nerio-ui/ui";import { Button } from "@nerio-ui/ui/client";<Item variant="outline">  <ItemMedia variant="icon"><FileText /></ItemMedia>  <ItemContent>    <ItemTitle>Research brief</ItemTitle>    <ItemDescription>Updated today · 12 collaborators have access.</ItemDescription>  </ItemContent>  <ItemActions><Button size="sm" variant="secondary">Open</Button></ItemActions></Item>

Installation and imports

Install the editable registry source, or use the matching package entrypoint when the product keeps Nerio as a workspace dependency.

pnpm exec nerio add itemimport { Item, ItemActions, ItemContent, ItemMedia, ItemTitle } from '@nerio-ui/ui';

Usage

import { Item, ItemActions, ItemContent, ItemMedia, ItemTitle } from '@nerio-ui/ui';<Item render={<a href="/settings" />}>  <ItemMedia variant="icon">...</ItemMedia>  <ItemContent><ItemTitle>Workspace settings</ItemTitle></ItemContent>  <ItemActions>...</ItemActions></Item>

Variants

VariantPurpose
plainPlain is part of the public component contract.
outlineOutline is part of the public component contract.
softSoft is part of the public component contract.
smCompact size for dense layouts and inline use.
mdDefault size for most product surfaces.
lgLarger size for prominent local actions.
default-mediaDefault Media is part of the public component contract.
icon-mediaIcon Media is part of the public component contract.
image-mediaImage Media is part of the public component contract.

Anatomy

SlotPurpose
itemGeneric root with no implicit role.
item-groupOptional full-width grouping container.
item-separatorItem Separator slot exposed through data-slot="item-separator".
item-mediaOptional leading custom, icon, or image media.
item-contentFlexible main region with safe minimum inline size.
item-titleItem Title slot exposed through data-slot="item-title".
item-descriptionItem Description slot exposed through data-slot="item-description".
item-actionsIndependent trailing controls or compact metadata.
item-headerItem Header slot exposed through data-slot="item-header".
item-footerItem Footer slot exposed through data-slot="item-footer".

States

StatePurpose
SelectedConsumer-supplied data-selected uses the semantic selected surface.
Disabledaria-disabled reduces emphasis; consumers prevent activation for native links.
Loadingdata-loading suppresses pointer interaction while composed Skeleton or Spinner preserves layout.

Motion

  • hover and press only on native interactive rendered roots

Accessibility

  • Item has no implicit role; choose div, li, a, or button according to context.
  • Use render with a native anchor or button only when the full item has one clear interaction.
  • A ref already attached to the render element is composed with the forwarded Item or ItemGroup ref; callback and object refs are both supported.
  • Do not nest independent actions inside a fully clickable Item.
  • Static Items are not focusable; interactive rendered roots keep native keyboard and focus behavior.
  • ItemSeparator is decorative by default.

Review the shared responsibility and evidence boundaries in the Accessibility foundation alongside this component-specific contract. Use the Spacing & layout foundation for shared density, wrapping, overflow, reflow, and component-versus-product ownership guidance. The Color foundation, Typography foundation, and Localization foundation define the shared visual-role, text-resilience, direction, and locale boundaries used by component examples.

API

PartAPIPurpose
Itemvariant | size | renderRoot composition; render a native interactive element when needed. Existing render refs compose with the forwarded ref.
ItemMediadefault | icon | imageSupports visual media. Compose Avatar directly instead of adding an avatar mode.
ItemGroup / ItemSeparatorchildrenGroups related items without list semantics or automatic dividers.
Content slotsItemContent | ItemTitle | ItemDescription | ItemActions | ItemHeader | ItemFooterIndependent layout regions with native props, refs, className, and stable data slots.

Implementation contract

ContractValue
Registry itemitem installs Item with the Separator registry dependency.
Base UINo interactive primitive required.
Registry dependenciesseparator
Package dependencies@nerio-ui/adapters, clsx, react

Styling contract

ContractValue
AuthoringComplete, statically detectable Tailwind CSS v4 recipes own component visuals.
ValuesSemantic and component --n-* variables remain the canonical customization layer.
OverridesCustomizable slots merge consumer className values with tailwindCn so conflicting utilities resolve deterministically.
Residual CSSOnly shared keyframes and scoped no-Preflight compatibility rules remain; there is no parallel visual selector layer.

Design notes

  • Use Item to compose a compact content unit with optional media, metadata, and actions without forcing list semantics or interaction.

Do / do not

Use Item
For settings rows, integrations, results, files, people, and compact content inside overlays.
Do not use Item
For form-control labels, selectable listbox behavior, data tables, or a product-specific activity feed.

Tokens

These are the primary customization points. Override semantic or component tokens instead of changing component source.

TokenPurpose
--n-item-gapPublic customization point for this component contract.
--n-item-group-outline-gapPublic customization point for this component contract.
--n-item-paddingPublic customization point for this component contract.
--n-item-radiusPublic customization point for this component contract.
--n-item-background-hoverPublic customization point for this component contract.
--n-item-background-selectedPublic customization point for this component contract.
--n-item-borderPublic customization point for this component contract.
--n-item-media-size-mdPublic customization point for this component contract.
--n-focus-ringPublic customization point for this component contract.