Skip to content

File

ReleasedShipped in 0.2.0StorybookFigma node 204:56Source
  • Use type dropzone where people add files: attachments in messages and support requests, room photos and verification documents in the back office.
  • Use type item for each file once it is added, in a list under the drop zone, with its name, type and size.
  • Show state uploading with the progress while a file is sending, and state error with the reason when a file is refused.
  • Put the accepted types and the size limit in the Hint, such as “PDF, JPG or PNG · 10 MB each”.
  • Say what went wrong and how to fix it in the error, such as “Too large: the limit is 10 MB”.
  • Keep the whole drop zone clickable, so “browse” works without dragging, on touch screens too.
  • To show a document people download but never upload, such as a receipt or invoice: use a Link or a table row.
    Instead: Link, table row
  • For a profile photo: use Avatar with its own upload action.
    Instead: Avatar
  • Do not hide the limits: never leave the Hint empty.
    The Figma page names no alternative.

From the Figma documentation page (usage node 204:76), as written. These items aren’t carried into File.intent.json, which has no field for them.

  • Put the accepted types and the size limit in the Hint, such as “PDF, JPG or PNG · 10 MB each”.
  • Say what went wrong and how to fix it in the error, such as “Too large: the limit is 10 MB”.
  • Keep the whole drop zone clickable, so “browse” works without dragging, on touch screens too.
Property Value What it is for
type dropzone where people add files: attachments in messages and support requests, room photos and verification documents in the back office.
type item for each file once it is added, in a list under the drop zone, with its name, type and size.
  • The dropzone is a <label> wrapping a native <input type=“file”> (visually the whole zone), so clicking anywhere on it, or Tab then Enter/Space, opens the browser’s file picker and works on touch without dragging. src/components/File/File.tsx:121
  • The file input is described by the hint text (aria-describedby), so accepted types and size limit are announced with it. src/components/File/File.tsx:137
  • The input is natively disabled when disabled is set, and the dropzone shows a focus outline on keyboard focus. src/components/File/File.tsx:136
  • The item’s meta line has role=“alert” in state error, so the reason is announced. src/components/File/File.tsx:72
  • The item’s type badge is aria-hidden, and its Remove/Cancel action is a native <button type=“button”>. src/components/File/File.tsx:67

From Versioning (VERSIONING.md at b9ffb76):

0.3.0 adds six components on top of 0.2.1: Calendar, Card, Form, Modal, SideBar and Table. It contains twenty-three components, each exported from the package root with its props type: Avatar, Breadcrumbs, Button, ButtonGroup, Calendar, Card, Checkbox, Chip, Dropdown, File, Form, Header, Image, Link, Logo, Modal, ProgressBar, RadioCard, SearchBar, SideBar, Stepper, Table, Toggle. Textfield is exported from the package root as well, with TextfieldProps and TextfieldState, and is public like the others (see decisions.md, 2026-10-07, Textfield). It commits you to their props, prop values and defaults, their hz- class names, the tokens in tokens.css and the three entry points (., ./styles.css, ./tokens.css). Everything in 0.3.0 beyond 0.2.1 is an addition: nothing from 0.2.1 was changed, removed or renamed. A change that breaks any of these on 0.x bumps the version to 0.4.0.

Two things about this release are worth knowing:

  • Form, Modal and Table each passed release review with their literal sizes covered by a ruling in decisions.md (Card, SideBar and Calendar have their own), because no size tokens exist for them. Those literals are accepted until the designer adds matching tokens, so a later change to use tokens at the same rendered sizes would be a patch, not a breaking change.
  • Dark theme is not verified for Table, and its warning tag has low contrast. The Table docs page says so. Neither is a breaking-change risk, but a fix that changes a token’s value is a patch and is listed in the changelog.