DocumentListItem
One document entry in a document list.
One document entry in a document list.
<div class="document-list-item" aria-label="one document entry in a document list">DocumentListItem</div><DocumentListItem title="Annual report" href="/annual.pdf" type="PDF" size="1.2 MB" modified="14 January 2026" />
// In your Svelte component:
import DocumentListItem from "lily-design-system-svelte-headless/components/DocumentListItem/DocumentListItem.svelte";
<DocumentListItem>
<!-- DocumentListItem content -->
</DocumentListItem>
<DocumentListItem title="Annual report" href="/annual.pdf" type="PDF" size="1.2 MB" modified="14 January 2026" />
| Prop | Type | Default | Description |
|---|---|---|---|
title | string (required) | — | Document title (link text) |
href | string (required) | — | Document URL |
type | string | — | File type label, e.g. "PDF", "DOCX" |
size | string | — | File size, e.g. "1.2 MB" |
modified | string | — | Last-modified date string |
...restProps | HTML attributes | — | Spread onto the root <li> |
DocumentListDownloadButton for a single, prominent download actionThis 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-item as the root class. No default styles are included.
document-list — parent listdownload-button — single download link styled as a button<li> containing the document title (as a link), file type, file size, and optional last-modified date<a download> so browsers offer a download dialog<span> elementsrestProps onto the root <li>Generated from this component's canonical metadata — the machine-checked source the implementations are held to.
title: string (required) (default: —) — Document title (link text)href: string (required) (default: —) — Document URLtype: string (default: —) — File type label, e.g. "PDF", "DOCX"size: string (default: —) — File size, e.g. "1.2 MB"modified: string (default: —) — Last-modified date string...restProps: HTML attributes (default: —) — Spread onto the root <li>