List Component
Basic List with Avatars
- Most played songs this week
- Dio LupaRemaining Reason
- Ellie BeilishBears of a fever
- Sabrino GardenerCappuccino
<List className="bg-base-100 rounded-box shadow-md"> <ListRow avatar={ <Avatar>...</Avatar> } title="Song Title" subtitle="Artist Name" actions={ [<Button />, <Button />] } /></List>Selectable List with Checkboxes
0 selected
- Select songs to add to playlist
- Dio LupaRemaining Reason
- Ellie BeilishBears of a fever
- Sabrino GardenerCappuccino
<ListRow selectable selected={ isSelected } onSelect={ (checked) => setSelected(checked) } avatar={ <Avatar>...</Avatar> } title="Item title"/>List with Pagination
- Displaying 1 to 5 of 25 items
- Item 1Artist for item 1
- Item 2Artist for item 2
- Item 3Artist for item 3
- Item 4Artist for item 4
- Item 5Artist for item 5
// Example layout structure<div className="flex flex-col gap-4"> <List>...</List> <div className="flex justify-center"> <Pagination ... /> </div></div>List with Leading Numbers (Third Column Grows)
- Top tracks of the month
- 01Dio LupaRemaining Reason
- 02Ellie BeilishBears of a fever
- 03Sabrino GardenerCappuccino
<ListRow leading={ <div className="text-4xl">01</div> } avatar={ <Avatar>...</Avatar> } grow={ <CustomContent /> } growColumn={ 3 }/>List with Wrapped Content
- Songs with descriptions
- Dio LupaRemaining Reason
"Remaining Reason" became an instant hit, praised for its haunting sound and emotional depth.
- Ellie BeilishBears of a fever
"Bears of a Fever" captivated audiences with its intense energy and mysterious lyrics.
- Sabrino GardenerCappuccino
"Cappuccino" quickly gained attention for its smooth melody and relatable themes.
<ListRow avatar={ <Avatar>...</Avatar> } title="Title" subtitle="Subtitle" wrap={ <p>Long description that wraps...</p> } actions={ <Button /> }/>Clickable List Rows
- Click on a row
- Dio LupaRemaining Reason
- Ellie BeilishBears of a fever
- Sabrino GardenerCappuccino
<ListRow clickable onClick={ () => handleClick() } title="Clickable item"/>Users List with Status and Multiple Actions
- Team members
- Jane Cooperjane@example.com
- Wade Warrenwade@example.com
- Esther Howardesther@example.com
<ListRow avatar={ <Avatar indicator="online">...</Avatar> } grow={ <div><h3>Name</h3><p>Email</p></div> } content={ <div><Badge>Role</Badge></div> } actions={ [<Button />, <Button />, <Button />] }/>Custom Content Layout
- Featured products
- 4.8Premium Wooden TableHandcrafted oak woodNewIn Stock
- 4.6Ergonomic ChairComfortable designSale
<ListRow leading={ <Rating /> } grow={ <ProductInfo /> } content={ <Price /> } actions={ <Button>Add to Cart</Button> }/>Props Reference
| Prop | Type | Description |
|---|---|---|
avatar | ReactNode | Avatar element (replaced by checkbox when selectable) |
selectable | boolean | Show checkbox instead of avatar |
selected | boolean | Checkbox selected state |
onSelect | function | Selection change handler: (checked) => void |
title | string | Main title text |
subtitle | string | Subtitle text (small, uppercase) |
leading | ReactNode | Element before avatar/checkbox |
grow | ReactNode | Custom content for grow column |
growColumn | number | Which column grows (default: 2) |
wrap | ReactNode | Content that wraps to next row |
actions | ReactNode | Array | Action buttons on the right |
clickable | boolean | Add hover/cursor styles |
onClick | function | Row click handler |