← Inventory
AttributeCard
AttributeCard UI component. Import from "@desk/ui/compositions/attribute-card".
Usage
import { AttributeCard, AttributeCardProps } from "@desk/ui/compositions/attribute-card";Best practices
Use
AttributeCardfor a single label + prominent value stat tile (a KPI/metric); for many key/value pairs about one entity reach forDescriptionListinstead.Pass a Lucide component to
icon(e.g.RulerIcon), not a rendered<Icon/>— it is handed to the internalIconat a fixedsmsize.This is a preset composition of
Card; restyle via the surrounding layout rather than reaching inside — for a bespoke layout composeCard/CardContentdirectly.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| attributeLabel | string | Attribute label | |
| className | string | CSS class name | |
| icon | LucideIcon | React.ComponentType<React.SVGProps<SVGSVGElement>> | ||
| valueLabel | string | Current value | |
| valueSubLabel | string | Current value |
Also exports
- interface
AttributeCardProps