DocumentList
A list displaying documents with titles and metadata.
A list displaying documents with titles and metadata.
<div class="document-list" aria-label="a list displaying documents with titles and metadata">DocumentList</div><DocumentList>
<DocumentListItem title="Annual report 2025" href="/docs/annual-2025.pdf" type="PDF" size="1.2 MB" />
<DocumentListItem title="Statement of accounts" href="/docs/accounts-2025.pdf" type="PDF" size="540 KB" />
</DocumentList>
// In your Svelte component:
import DocumentList from "lily-design-system-svelte-headless/components/DocumentList/DocumentList.svelte";
<DocumentList>
<!-- list children -->
</DocumentList>
<DocumentList>
<DocumentListItem title="Annual report 2025" href="/docs/annual-2025.pdf" type="PDF" size="1.2 MB" />
<DocumentListItem title="Statement of accounts" href="/docs/accounts-2025.pdf" type="PDF" size="540 KB" />
</DocumentList>
| Prop | Type | Default | Description |
|---|---|---|---|
children | slot (required) | — | DocumentListItem children |
...restProps | HTML attributes | — | Spread onto the root <ol> |
CollectionList for general content collections (articles, products)DataTable when document metadata needs sortable columnsThis headless component renders semantic HTML with appropriate ARIA wiring. The consumer provides all visual styling — no CSS, animations, or layout assumptions are baked in.
The component renders with .document-list as the root class. No default styles are included.
document-list-item — child itemcollection-list — generic content collectiondownload-button — single download link styled as a button<ol> of DocumentListItem childrenrestProps onto the root <ol>Generated from this component's canonical metadata — the machine-checked source the implementations are held to.
children: slot (required) (default: —) — DocumentListItem children...restProps: HTML attributes (default: —) — Spread onto the root <ol>