Light

Item

A flexible list item with media, content, description, and action slots.

Spec · from metadata

When to use

  • Displaying items in a list or feed (notifications, messages, files)
  • Content cards with structured layout (media, title, description, actions)
  • Settings or config rows with title + description + action

When not to use

  • Simple text list — use a plain ul/li
  • Data tables — use Table component instead
  • Navigation menu items — use sidebar or navigation components

Variants

PropValuesDefaultDescription
variantdefaultoutlinemuteddefaultdefault is transparent; outline adds border; muted adds bg-muted/50.
sizedefaultsmdefaultControls padding and gap: default is p-4 gap-4, sm is py-3 px-4 gap-2.5.
variant (ItemMedia)defaulticonimagedefaultdefault shows raw content; icon adds 32px bordered container; image adds 40px cover container.

Anti-patterns

Avoid<div className="flex items-center gap-4 p-4">
  <FileIcon />
  <div>
    <h3>Title</h3>
    <p>Description</p>
  </div>
</div>
Prefer<Item>
  <ItemMedia variant="icon"><FileIcon /></ItemMedia>
  <ItemContent>
    <ItemTitle>Title</ItemTitle>
    <ItemDescription>Description</ItemDescription>
  </ItemContent>
</Item>

Use Item with sub-components for consistent layout, spacing, and variant support.

Accessibility

  • Screen readerItemGroup has role='list'. Each Item is a visual group. Links within items trigger hover styles on the item. ItemDescription uses text-balance for readability.
  • ContrastItemDescription uses text-muted-foreground. ItemTitle uses default foreground.

Token bindings

TokenCategoryUsage
bordercolorOutline variant border
mutedcolorMuted variant background and icon media background
muted-foregroundcolorDescription text
accentcolorHover state for items with links
rounded-mdradiusItem border radius

Import

import {
  Item,
  ItemActions,
  ItemContent,
  ItemDescription,
  ItemGroup,
  ItemMedia,
  ItemSeparator,
  ItemTitle,
} from "@timelycare/helix-ui"

Props

interface ItemProps extends React.HTMLAttributes<HTMLDivElement> {
  variant?: "default" | "outline"
  size?: "default" | "sm"
  asChild?: boolean
  className?: string
  children: React.ReactNode
}

interface ItemMediaProps extends React.HTMLAttributes<HTMLDivElement> {
  variant?: "default" | "icon"
  className?: string
  children: React.ReactNode
}

interface ItemContentProps extends React.HTMLAttributes<HTMLDivElement> {
  className?: string
  children: React.ReactNode
}

interface ItemTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {
  className?: string
  children: React.ReactNode
}

interface ItemDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
  className?: string
  children: React.ReactNode
}

interface ItemActionsProps extends React.HTMLAttributes<HTMLDivElement> {
  className?: string
  children: React.ReactNode
}

interface ItemGroupProps extends React.HTMLAttributes<HTMLDivElement> {
  className?: string
  children: React.ReactNode
}

interface ItemSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
  className?: string
}

Styling

Container

PropertyValueTailwind
DisplayFlex, horizontalflex items-center
Gap12pxgap-3
Padding (default)12px 16pxpx-4 py-3
Padding (sm)8px 12pxpx-3 py-2
Border radius8pxrounded-md

Typography

ElementFontSizeColor
TitleAdelle Sans Medium14px (text-sm)text-foreground
DescriptionAdelle Sans Regular14px (text-sm)text-muted-foreground

Media

VariantBehavior
defaultRenders children directly (avatars, images, any content)
iconWraps icon in a muted background circle; icon sized at size-5 (20px)

Variants

VariantBorderBackgroundUse For
defaultNoneTransparentLists, menus, navigation items
outlineborder border-borderbg-backgroundStandalone cards, highlighted items

Sizes

SizePaddingUse For
defaultpx-4 py-3Standard list items, cards
smpx-3 py-2Compact lists, notification items

Sub-Components

ComponentPurpose
ItemRoot container — flex row layout
ItemMediaLeading visual (icon, avatar, image)
ItemContentTitle + description text block
ItemTitlePrimary text label
ItemDescriptionSecondary descriptive text
ItemActionsTrailing actions (buttons, icons, chevrons)
ItemGroupGroups multiple items with optional separators
ItemSeparatorHorizontal divider between items

Common Patterns

Basic Item

<Item variant="outline">
  <ItemContent>
    <ItemTitle>Basic Item</ItemTitle>
    <ItemDescription>A simple item with title and description.</ItemDescription>
  </ItemContent>
  <ItemActions>
    <Button variant="outline" size="sm">Action</Button>
  </ItemActions>
</Item>

With Icon

<Item variant="outline">
  <ItemMedia variant="icon">
    <ShieldAlertIcon />
  </ItemMedia>
  <ItemContent>
    <ItemTitle>Security Alert</ItemTitle>
    <ItemDescription>New login detected from unknown device.</ItemDescription>
  </ItemContent>
  <ItemActions>
    <Button size="sm" variant="outline">Review</Button>
  </ItemActions>
</Item>

With Avatar

<Item variant="outline">
  <ItemMedia>
    <Avatar className="size-10">
      <AvatarImage src="/user.png" />
      <AvatarFallback>JD</AvatarFallback>
    </Avatar>
  </ItemMedia>
  <ItemContent>
    <ItemTitle>Jane Doe</ItemTitle>
    <ItemDescription>Last seen 5 minutes ago</ItemDescription>
  </ItemContent>
  <ItemActions>
    <Button size="icon-sm" variant="outline" className="rounded-full" aria-label="Add">
      <PlusIcon />
    </Button>
  </ItemActions>
</Item>

As Link

<Item asChild>
  <a href="/dashboard">
    <ItemMedia variant="icon">
      <HomeIcon />
    </ItemMedia>
    <ItemContent>
      <ItemTitle>Dashboard</ItemTitle>
      <ItemDescription>Overview of your account and activity.</ItemDescription>
    </ItemContent>
  </a>
</Item>

Item List with Separators

<ItemGroup>
  {users.map((user, index) => (
    <React.Fragment key={user.id}>
      <Item>
        <ItemMedia>
          <Avatar>
            <AvatarImage src={user.avatar} />
            <AvatarFallback>{user.initials}</AvatarFallback>
          </Avatar>
        </ItemMedia>
        <ItemContent>
          <ItemTitle>{user.name}</ItemTitle>
          <ItemDescription>{user.email}</ItemDescription>
        </ItemContent>
        <ItemActions>
          <Button variant="ghost" size="icon" className="rounded-full">
            <PlusIcon />
          </Button>
        </ItemActions>
      </Item>
      {index !== users.length - 1 && <ItemSeparator />}
    </React.Fragment>
  ))}
</ItemGroup>

Compact Size

<Item variant="outline" size="sm" asChild>
  <a href="/verified">
    <ItemMedia>
      <BadgeCheckIcon className="size-5" />
    </ItemMedia>
    <ItemContent>
      <ItemTitle>Your profile has been verified.</ItemTitle>
    </ItemContent>
    <ItemActions>
      <ChevronRightIcon className="size-4" />
    </ItemActions>
  </a>
</Item>

Accessibility

  • When used as a link (asChild with <a>), inherits link semantics automatically
  • ItemActions buttons should have appropriate aria-label for icon-only actions
  • For lists, wrap in a semantic <ul> / <li> structure or use ARIA role="list" / role="listitem"
  • Keyboard: Tab navigates between interactive items; Enter/Space activates links and buttons

Gotchas

ProblemSolution
Item doesn't look clickableUse asChild with <a> or add hover styles
Avatar not aligned with textItemMedia uses flex items-center by default
Actions overlap content on small screensUse responsive padding or hide secondary actions on mobile
Separator full-width bleedsItemSeparator is scoped to the ItemGroup container width
Icon media too largeUse variant="icon" on ItemMedia for consistent sizing

See Also

  • Related Components: Card (richer container), Avatar (user images), Empty (no-data state for lists), Sidebar (navigation items)
  • Tokens: Colorsforeground, muted-foreground, border tokens

Last updated: February 19, 2026