List
A component for rendering structured lists of data.
When To Use
- A list can be used to display content related to a single subject. The content can consist of multiple elements of varying type and size.
Usage
- JDJohn DoeSoftware Engineer
- JSJane SmithProduct Manager
astro
<List bordered divided>
<ListItem>
<Avatar fallback="JD" shape="circle" />
<ListItemMeta title="John Doe" description="Software Engineer" />
<Button slot="extra" variant="outline" size="sm">Follow</Button>
</ListItem>
<ListItem>
<Avatar fallback="JS" shape="circle" />
<ListItemMeta title="Jane Smith" description="Product Manager" />
<Button slot="extra" variant="outline" size="sm">Follow</Button>
</ListItem>
</List> API Reference
| Property | Description | Type | Default |
|---|---|---|---|
| bordered | Whether to show a border around the list. | boolean | false |
| divided | Whether to show borders between items. | boolean | false |