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:
With Header and Footer#
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)#
| Prop | Type | Default | Description |
|---|---|---|---|
| size | "sm" | "md" | "lg" | "md" | Size of the list |
| style | "ordered" | "unordered" | "unordered" | List style type |
| bordered | boolean | false | Add border around list |
| shadow | "none" | "sm" | "md" | "lg" | "none" | Shadow depth |
| interactive | boolean | false | Enable hover effects on items |
| as | "ul" | "ol" | - | Override element type (auto-set by style) |
| css | SystemStyleObject | - | Additional Panda CSS styles |
List.Header, List.Footer, List.ItemTitle, List.ItemDescription, List.ItemContent#
| Prop | Type | Default | Description |
|---|---|---|---|
| css | SystemStyleObject | - | Additional Panda CSS styles |
List.Item#
| Prop | Type | Default | Description |
|---|---|---|---|
| css | SystemStyleObject | - | Additional Panda CSS styles |