List

A flexible list component for displaying collections of items with titles, descriptions, and interactive states.

Import
import { List } from "@sugarcoat/ui-nxt";
Usage
<List bordered>
<List.Item>
  <List.ItemTitle>Item Title</List.ItemTitle>
</List.Item>
</List>

Basic Usage#

A simple list of items.

Basic List

Anatomy#

The List component uses a compound component pattern:

<List>
  <List.Header />           {/* Optional header section */}
  <List.Item>               {/* List item */}
    <List.ItemTitle />      {/* Item title */}
    <List.ItemDescription />{/* Item description */}
    <List.ItemContent />    {/* Additional content */}
  </List.Item>
  <List.Footer />           {/* Optional footer section */}
</List>

Lists can include header and footer sections.

Header and Footer

Sizes#

Lists come in three sizes: sm, md (default), and lg.

Small
Medium
Large

Bordered#

Add a border around the list.

Without Border
With Border

Shadow#

Add shadow depth with none, sm, md, or lg.

No Shadow
Small Shadow
Medium Shadow
Large Shadow

Interactive#

Make list items hoverable.

Interactive List

Item Content#

Use ItemContent for additional custom content within items.

Custom Content

Common Patterns#

Settings List#

Settings

Task List#

Task List

Props#

List (Root)#

PropTypeDefaultDescription
size"sm" | "md" | "lg""md"Size of the list
style"ordered" | "unordered""unordered"List style type
borderedbooleanfalseAdd border around list
shadow"none" | "sm" | "md" | "lg""none"Shadow depth
interactivebooleanfalseEnable hover effects on items
as"ul" | "ol"-Override element type (auto-set by style)
cssSystemStyleObject-Additional Panda CSS styles

List.Header, List.Footer, List.ItemTitle, List.ItemDescription, List.ItemContent#

PropTypeDefaultDescription
cssSystemStyleObject-Additional Panda CSS styles

List.Item#

PropTypeDefaultDescription
cssSystemStyleObject-Additional Panda CSS styles
Customize Theme
Build your own sugarcoat/ui theme
PresetLime / Violet / Slate
Brand ColorLime
Accent ColorViolet
Gray ScaleSlate
Border RadiusLg