Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Render uploaded or downloadable files as accessible rows, links, or cards. Uses [data-file] with icon-wc, native download links, and optional status/actions.
Most interfaces that move files around — attachments, downloads, upload progress, asset galleries — need the same four ingredients: a type icon, a name, some meta (size, status, extension), and optional actions (download, remove, retry).
Vanilla Breeze ships a CSS-only pattern for this under [data-file]. It applies to <li>, <a>, or any block container, so you can compose it inside a list, use it as a clickable download link, or drop it into a <layout-grid>. No web component — just markup.
Key features:
data-file-layout="card"data-file-status="uploading|success|error"<a data-file href="…" download>) with hover and focus statesicon-wc for type icons and <layout-grid> for galleriesThe default layout: icon, name, meta, and actions in a single row. Name truncates with an ellipsis, meta is font-variant-numeric: tabular-nums so sizes align vertically in a list.
<ul class="file-list"> <li data-file> <icon-wc name="file-text"></icon-wc> <span class="file-name">quarterly-report.pdf</span> <span class="file-meta">2.4 MB</span> <span class="file-actions"> <a href="/files/quarterly-report.pdf" download>Download</a> </span> </li> <li data-file> <icon-wc name="image"></icon-wc> <span class="file-name">site-screenshot.png</span> <span class="file-meta">842 KB</span> <span class="file-actions"> <a href="/files/site-screenshot.png" download>Download</a> </span> </li></ul>
For a quieter list, put data-file directly on an <a>. The whole row becomes clickable and picks up hover/focus styles automatically. Pair with download for same-origin files and target="_blank" rel="noopener" for external links.
<ul class="file-list"> <li> <a data-file href="/files/quarterly-report.pdf" download> <icon-wc name="file-text"></icon-wc> <span class="file-name">quarterly-report.pdf</span> <span class="file-meta">2.4 MB</span> </a> </li> <li> <a data-file href="https://example.com/schedule" target="_blank" rel="noopener"> <icon-wc name="external-link"></icon-wc> <span class="file-name">Event schedule (web)</span> <span class="file-meta">example.com</span> </a> </li></ul>
Add data-file-layout="card" for a stacked icon-above-name layout that slots into a <layout-grid>. Good for asset galleries and download directories.
<layout-grid data-layout-min="180px" data-layout-gap="m"> <a data-file data-file-layout="card" href="/files/quarterly-report.pdf" download> <icon-wc name="file-text"></icon-wc> <span class="file-name">quarterly-report.pdf</span> <span class="file-meta">2.4 MB · PDF</span> </a> <a data-file data-file-layout="card" href="/files/design-assets.zip" download> <icon-wc name="archive"></icon-wc> <span class="file-name">design-assets.zip</span> <span class="file-meta">18.7 MB · ZIP</span> </a></layout-grid>
For upload flows, the meta text is the status. Use data-file-status to color it semantically: uploading / processing map to the interactive color, success to green, error to red. Put the remove or retry action in .file-actions.
<section aria-label="Selected files"><ul class="file-list"> <li data-file data-file-status="success"> <icon-wc name="file-text"></icon-wc> <span class="file-name">contract.pdf</span> <span class="file-meta">1.2 MB · uploaded</span> <span class="file-actions"> <button type="button" class="ghost icon-only" aria-label="Remove contract.pdf"> <icon-wc name="x"></icon-wc> </button> </span> </li> <li data-file data-file-status="uploading"> <icon-wc name="image"></icon-wc> <span class="file-name">scan-page-3.jpg</span> <span class="file-meta">4.8 MB · uploading 62%</span> <span class="file-actions"> <button type="button" class="ghost icon-only" aria-label="Cancel upload"> <icon-wc name="x"></icon-wc> </button> </span> </li> <li data-file data-file-status="error"> <icon-wc name="file-warning"></icon-wc> <span class="file-name">payroll.xlsx</span> <span class="file-meta">22 MB · too large (max 10 MB)</span> <span class="file-actions"> <button type="button" class="secondary">Retry</button> </span> </li></ul></section>
| Attribute | Values | Description |
|---|---|---|
data-file |
boolean | Opts the element in to the file row layout. Works on <li>, <a>, or any block container. |
data-file-layout |
card |
Switch to a stacked (icon-above-name) card layout. Default omitted = single-row layout. |
data-file-status |
uploading, processing, success, error |
Colors the .file-meta text to signal upload state. Falls back to muted text when omitted. |
| Class | Where | Purpose |
|---|---|---|
.file-list |
on <ul>/<ol> |
Removes list styling and stacks rows with a small gap. Optional — only needed when rows are in a list. |
.file-name |
inside [data-file] |
Flexible; truncates long names with ellipsis. Wraps in card layout instead. |
.file-meta |
inside [data-file] |
Muted, tabular-numeric text for size/status/type. |
.file-actions |
inside [data-file] |
Right-aligned slot for download/remove/retry controls. |
<a> for downloads and <button type="button"> for in-page actions (remove, retry, cancel). No div role="button" tricks.aria-label="Remove <filename>" so screen readers can distinguish one row’s remove button from the next.<output aria-live="polite"> so screen readers hear progress updates.icon-wc already sets aria-hidden="true" automatically. The filename carries the meaning.target="_blank" with the “opens in new tab” hint from Accessibility Utilities.Drag-and-drop file input. The file list it renders uses this same [data-file] pattern.
Declarative file-type gating for file inputs.
Native download semantics and filename hints.
Lucide-backed icon component — source for the type icons used here.