<BaseList />
· A versatile list component.
<template>
<BaseList class="ps-4">
<li>Finish project UX</li>
<li>Meet with Andy at 3:00pm</li>
<li>Get groceries for Anna</li>
<li>Pay water bill</li>
</BaseList>
</template>
This component accepts a <li/>
or a BaseListItem
as a child. You can customize the list's visual style by using the available props.
<template>
<BaseList>
<BaseListItem>
<!-- Content goes here -->
</BaseListItem>
</BaseList>
</template>
This component has props that you can use to modify its style and behavior.
Prop | Type |
---|---|
ordered default: false | boolean If the list should be ordered. |
media default: - | boolean Force the list to be media. |
Prop | Type |
---|---|
title default: - | string The title of the list item. |
subtitle default: - | string The subtitle of the list item. |
Slot | Type |
---|---|
#default | {} |
#title | {} |
#subtitle | {} |
#end | {} |
Use the ordered
prop to set the list component to an ordered list.
<template>
<BaseList ordered class="ps-4">
<li>Finish project UX</li>
<li>Meet with Andy at 3:00pm</li>
<li>Get groceries for Anna</li>
<li>Pay water bill</li>
</BaseList>
</template>
Use the <ListItem />
component inside the list to add a subtitle.
Close resubing pending tasks
Meeting about next project steps
In preparation of next Friday's party
Bill must be paid before next Tuesday
<template>
<BaseList>
<BaseListItem
title="Finish project UX"
subtitle="Close resubing pending tasks"
/>
<BaseListItem
title="Meet with Andy at 3:00pm"
subtitle="Meeting about next project steps"
/>
<BaseListItem
title="Get groceries for Anna"
subtitle="In preparation of next Friday's party"
/>
<BaseListItem
title="Pay water bill"
subtitle="Bill must be paid before next Tuesday"
/>
</BaseList>
</template>
Use the <ListItem />
component default slot to display an icon.
Close resubing pending tasks
Meeting about next project steps
In preparation of next Friday's party
Bill must be paid before next Tuesday
<template>
<BaseList>
<BaseListItem
title="Finish project UX"
subtitle="Close resubing pending tasks"
>
<Icon
name="solar:document-add-linear"
class="text-2xl text-muted-400 dark:text-muted-500"
/>
</BaseListItem>
<BaseListItem
title="Meet with Andy at 3:00pm"
subtitle="Meeting about next project steps"
>
<Icon name="solar:map-point-linear" class="text-2xl text-muted-400 dark:text-muted-500" />
</BaseListItem>
<BaseListItem
title="Get groceries for Anna"
subtitle="In preparation of next Friday's party"
>
<Icon name="solar:cart-3-linear" class="text-2xl text-muted-400 dark:text-muted-500" />
</BaseListItem>
<BaseListItem
title="Pay power bill"
subtitle="Bill must be paid before next Tuesday"
>
<Icon name="solar:bolt-linear" class="text-2xl text-muted-400 dark:text-muted-500" />
</BaseListItem>
</BaseList>
</template>
Use the <ListItem />
component default slot to display an avatar.
Close resubing pending tasks
Meeting about next project steps
In preparation of next Friday's party
Bill must be paid before next Tuesday
<template>
<BaseList>
<BaseListItem
title="Finish project UX"
subtitle="Close resubing pending tasks"
>
<BaseAvatar src="/img/people/44.jpg" />
</BaseListItem>
<BaseListItem
title="Meet with Andy at 3:00pm"
subtitle="Meeting about next project steps"
>
<BaseAvatar src="/img/people/19.jpg" />
</BaseListItem>
<BaseListItem
title="Get groceries for Anna"
subtitle="In preparation of next Friday's party"
>
<BaseAvatar src="/img/people/17.jpg" />
</BaseListItem>
<BaseListItem
title="Pay water bill"
subtitle="Bill must be paid before next Tuesday"
>
<BaseAvatar src="/img/people/51.jpg" />
</BaseListItem>
</BaseList>
</template>