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

ng g @spartan-ng/cli:ui item

Usage

import { HlmItemImports } from '@spartan-ng/helm/item';
<hlm-item>
  <hlm-item-media variant="icon">
    <ng-icon name="lucideBadgeCheck" />
  </hlm-item-media>
  <hlm-item-content>
    <hlm-item-title>Title</hlm-item-title>
    <hlm-item-description>Description</hlm-item-description>
  </hlm-item-content>
  <hlm-item-actions>
    <button hlmBtn>Action</button>
  </hlm-item-actions>
</hlm-item>

Composition

Use the following composition to build an Item:

hlm-item-group
└── hlm-item
    ├── hlm-item-header
    ├── hlm-item-media
    ├── hlm-item-content
    │   ├── hlm-item-title
    │   └── hlm-item-description
    ├── hlm-item-actions
    └── hlm-item-footer

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 .

Examples

Variants

Use the variant prop 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.

Size

Use the size prop 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.

Icon

Use hlm-item-media with variant="icon" to display an icon.

Security Alert

New login detected from unknown device.

Avatar

EREvil Rabbit

Last seen 5 months ago

ER
No Team Members

Invite your team to collaborate on this project.

Image

Use hlm-item-media with variant="image" to display an image.

Group

Sspartan-ng

spartan@ng.com

Mmaxleiter

maxleiter@vercel.com

Eevilrabbit

evilrabbit@vercel.com

Header

v0-1.5-smv0-1.5-sm

Everyday tasks and UI generation.

v0-1.5-lgv0-1.5-lg

Advanced thinking or reasoning.

v0-2.0-miniv0-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

RTL

To enable RTL support in spartan-ng, see the RTL configuration guide.

عنصر أساسي

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

تم التحقق من ملفك الشخصي.

Helm API

HlmItemActions

Selector: [hlmItemActions],hlm-item-actions

HlmItemContent

Selector: [hlmItemContent],hlm-item-content

HlmItemDescription

Selector: [hlmItemDescription],hlm-item-description

HlmItemFooter

Selector: [hlmItemFooter],hlm-item-footer

HlmItemGroup

Selector: [hlmItemGroup],hlm-item-group

HlmItemHeader

Selector: [hlmItemHeader],hlm-item-header

HlmItemMedia

Selector: [hlmItemMedia],hlm-item-media

Inputs

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

HlmItemSeparator

Selector: [hlmItemSeparator],hlm-item-separator

HlmItemTitle

Selector: [hlmItemTitle],hlm-item-title

HlmItem

Selector: [hlmItem],hlm-item

Inputs

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