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>
<a
href="/annual.pdf"
download
>Annual report</a
>
<span>PDF</span>
<span>1.2 MB</span>
</DocumentListItem>
// 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.
children: slot (required) (default: —) — The document link and its details...restProps: HTML attributes (default: —) — Spread onto the root <li>This page as Markdown, for people and AI tools: document-list-item.md