Skip to content

Search

Start typing to search.


Show all pages

Documentation

controls

File upload

A native file picker for documents and photos, with its button dressed by the skin.

CSS onlyPlain classes; no JavaScript in any stack.

Usage

A native <input type="file"> inside a field. accept limits the file types.

A photo or a PDF, up to 10 MB.

HTML

Examples

Several files

Add multiple to let people choose more than one file.

Choose several files at once.

HTML

Guidance and accessibility

When to use

  • Use it to upload a document or a photo as part of a form.
  • Say which files work and how large they may be in a hint, before people choose.
  • Check type and size on the server too; accept only filters the picker.

Accessibility

  • It is the native control: the keyboard, screen readers and phone cameras work as people expect.
  • Connect a visible <label> with for and id, and the hint with aria-describedby.
  • The browser writes the button text and the chosen file name in the visitor’s language.

Classes

Generated from the component contract. Parts use __, modifiers use --.

Classes of the file-upload component
ClassKindUse it for
ca-file-uploadComponentA native <input type="file">; the skin dresses its button.

Skins

The same markup, dressed by each skin. Structure and behavior stay the same; only the look changes.

Base skin

Neutral grayscale starting point; product skins extend it and change what differs.

A photo or a PDF, up to 10 MB.

Calaca skin

The Calaca UI brand: hueso paper and tinta ink, cempasúchil marigold, rosa and jade.

A photo or a PDF, up to 10 MB.

Proof skin

Pilot skin pushed far from base: square, heavy, offset shadows, larger targets.

A photo or a PDF, up to 10 MB.

Crossview skin

The CrossView proofing table: cool ground, bond-paper sheets, rule-grey hairlines, one red mark.

A photo or a PDF, up to 10 MB.

Framework notes

Link the prebuilt stylesheet of your skin next to your brand theme. No build step.

HTML
<link rel="stylesheet" href="theme.css" />
<link rel="stylesheet" href="ca-base.css" />