Twitter2.2k

Item

A versatile component that you can use to display any content.

Basic Item

A simple item with title and description.

Your profile has been verified.

Installation

npx nx g @spartan-ng/cli:ui item

Usage

import { HlmItemImports } from '@spartan-ng/helm/item';
<div hlmItem>
  <div hlmItemHeader>Item Header</div>
  <div hlmItemMedia />
  <div hlmItemContent>
    <div hlmItemTitle>Item</div>
    <p hlmItemDescription>Item</div>
  </p hlmItemContent>
  <div hlmItemActions />
  <div hlmItemFooter>Item Footer</div>
</div>

Item vs Field

Use hlmField 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 hlmItem .

Variants

Default Variant

Standard styling with subtle background and borders.

Outline Variant

Outlined style with clear borders and transparent background.

Muted Variant

Subdued appearance with muted colors for secondary content.

Size

The hlmItem component has different sizes for different use cases. For example, you can use the sm size for a compact item or the default size for a standard item.

Basic Item

A simple item with title and description.

Your profile has been verified.

Icon

Security Alert

New login detected from unknown device.

Avatar

ER
Evil Rabbit

Last seen 5 months ago

ER
No Team Members

Invite your team to collaborate on this project.

Image

Group

S
spartan-ng

spartan@ng.com

M
maxleiter

maxleiter@vercel.com

E
evilrabbit

evilrabbit@vercel.com

Header

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.

To render an item as a link, use a anchor element. The hover and focus states will be applied to the anchor element.

Dropdown

Helm API

HlmItemActions

Selector: div[hlmItemActions]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmItemContent

Selector: div[hlmItemContent]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmItemDescription

Selector: p[hlmItemDescription]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmItemFooter

Selector: div[hlmItemFooter]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmItemGroup

Selector: div[hlmItemGroup]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmItemHeader

Selector: div[hlmItemHeader]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmItemMedia

Selector: div[hlmItemMedia]

Inputs

PropTypeDefaultDescription
class ClassValue --
variant ItemMediaVariants['variant'] this._config.variant -

HlmItemSeparator

Selector: div[hlmItemSeparator]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmItemTitle

Selector: div[hlmItemTitle]

Inputs

PropTypeDefaultDescription
class ClassValue --

HlmItem

Selector: div[hlmItem], a[hlmItem]

Inputs

PropTypeDefaultDescription
class ClassValue --
variant ItemVariants['variant'] this._config.variant -
size ItemVariants['size'] this._config.size -
Kbd Input OTP