Skip to content

Search

Start typing to search.


Show all pages

Documentation

controls

Input

A single-line text control for names, email addresses, numbers and searches.

CSS onlyPlain classes; no JavaScript in any stack.

Usage

An input needs the component class and one size, inside a field with a label.

HTML

Examples

Sizes

Sizes match the button sizes, so an input and a button line up in a row.

HTML

Input types

Use the right type, inputmode and autocomplete, so phones show the right keyboard and browsers can fill values in.

HTML

Dates and times

Use the native type="date", "time" and "datetime-local". Phones show their own pickers; min, max and step limit the choice.

HTML

Disabled

A disabled input cannot be changed or focused. For a value people should still read and copy, prefer readonly.

HTML

Guidance and accessibility

When to use

  • Use an input for short, free text. For one choice out of a few, use radio buttons or a select instead.
  • Match the width to the expected value: a postcode field does not need the full row.

Accessibility

  • Give every input a visible label. When a design has no room for one, use aria-label, as in the sizes example, but prefer a visible label.
  • Inputs stay at 16 pixels on small screens, so iOS does not zoom in on focus.
  • Never block pasting, including in password and one-time code fields.
  • Dates and times use the native fields: the keyboard, screen readers and phone pickers work as people expect, in the visitor’s own date format. The skin’s color-scheme keeps the picker dark in dark mode.
  • The core keeps a visible focus ring and styles aria-invalid="true" in every skin.

Classes

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

Classes of the input component
ClassKindUse it for
ca-inputComponentFull-width text control with the focus ring and invalid state.
ca-input--smSizeCompact size for toolbars and tables.
ca-input--mdSizeDefault size.
ca-input--lgSizeProminent size for search and sign-up forms.

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.

Calaca skin

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

Proof skin

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

Crossview skin

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

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" />