List
StableFlexible list component for displaying key-value information in horizontal rows with configurable spacing.
API Reference
Components
| Component | Description | Type | Default |
|---|---|---|---|
c-list
|
Main container with vertical flex layout | — |
—
|
c-list.item
|
Individual row with horizontal grid layout. Accepts a spacing prop.
|
— |
—
|
c-list.item Attributes
| Attribute | Description | Type | Default |
|---|---|---|---|
spacing
|
Vertical padding of each row | string |
"compact"
|
Spacing Values
| Value | Description | CSS | Use |
|---|---|---|---|
compact
|
Minimal vertical spacing — ideal for dashboard cards and dense layouts |
py-0.5
|
default |
standard
|
Balanced spacing for general use |
py-1
|
general |
spacious
|
Generous spacing for detailed or comfortable views |
py-2
|
detail |
Helper Classes
| Class | Description |
|---|---|
list-col-grow
|
Makes a direct child fill the remaining horizontal space (typically applied to the label column) |
list-col-wrap
|
Forces a direct child to wrap to the next line |
Accessibility
Semantic structure: c-list renders a <div>
with flex layout, not a semantic <dl>. For key-value data where the relationship
is meaningful, consider using a native <dl>/<dt>/<dd>
structure instead.
Color-only states: when using color classes like text-error
or text-warning to communicate status, pair them with a text label or icon
so users who cannot perceive color still get the information.
Examples
Usage
<c-list>
<c-list.item>
<div class="list-col-grow text-sm">Name</div>
<div>John Doe</div>
</c-list.item>
</c-list>
Basic Usage
User Information
-
NameJohn Doe
-
Emailjohn@example.com
-
StatusActive
<c-list>
<c-list.item>
<div class="list-col-grow text-sm">Name</div>
<div>John Doe</div>
</c-list.item>
<c-list.item>
<div class="list-col-grow text-sm">Status</div>
<div><c-badge color="success" size="sm">Active</c-badge></div>
</c-list.item>
</c-list>
Spacing Variants
Compact
-
Item 1Value
-
Item 2Value
-
Item 3Value
Standard
-
Item 1Value
-
Item 2Value
-
Item 3Value
Spacious
-
Item 1Value
-
Item 2Value
-
Item 3Value
<c-list.item spacing="compact">...</c-list.item>
<c-list.item spacing="standard">...</c-list.item>
<c-list.item spacing="spacious">...</c-list.item>
With Conditional Styling
Findings Summary
-
Total Findings42
-
Active15
-
Critical3
-
Resolved27
<c-list.item>
<div class="list-col-grow text-sm">Active</div>
<div class="text-warning">15</div>
</c-list.item>
<c-list.item>
<div class="list-col-grow text-sm">Critical</div>
<div class="text-error font-semibold">3</div>
</c-list.item>
Multiple Columns
Vessel Status
-
Vessel AExcellent4.8
-
Vessel BGood3.7
-
Vessel CFair2.4
<c-list.item>
<div class="text-sm">Vessel A</div>
<div class="list-col-grow text-center">
<c-badge color="success">Excellent</c-badge>
</div>
<div class="text-right">4.8</div>
</c-list.item>