Clinia UI

Input

One line of text, such as a name, an email or a search term.

shadcn docs →

When to use

  • One line of free text: a name, an email, a URL, a search term.

When not to use

  • Several lines: use Textarea.
  • A choice from a known list: use Select, Combobox or Radio Group.
  • A date: use Date Picker. A one-time code: use Input OTP.

Install

npx shadcn@latest add @clinia/input

Marketing (Sera)

Clinia rules

  • The resting border is the input token (#8c8c8c light, #777777 dark). It clears 3:1, so the field edge stays visible. Don't swap it for the border hairline.
  • An invalid field always comes with error text that says what to fix. The destructive border alone is not enough.
  • The text is text-base below 768px and md:text-sm above, so a size you pass applies to small screens only. Pass the md: size too: text-body-m md:text-body-m.

Do and don't

Do keep a visible label above the field.
Don't use the placeholder as the only label.
Do say what to fix in the error.
Don't turn the field red with no message.

States: product (Luma)

placeholder
filled
focus
invalid
disabled
read-only

Focus cells apply the component's focus-visible classes statically. Toggle the site theme to review both themes.

States: marketing (Sera)

placeholder
filled
focus
invalid
disabled
read-only

Focus cells apply the component's focus-visible classes statically. Toggle the site theme to review both themes.

Accessibility

Built in

  • Focus-visible shows a solid Trust ring (border-ring ring-3 ring-ring/30); aria-invalid swaps it to a destructive ring.
  • The resting border is the input token, which clears 3:1 on the page and on cards in both themes.

Your responsibility

  • Give every input a visible label: FieldLabel inside Field, or Label with htmlFor set to the input's id.
  • On error, set aria-invalid and point aria-describedby at the FieldError, so the message is read with the field.
  • Set type and autoComplete (email, tel, one-time-code) so browsers and password managers can help.

How to test

  1. Click the label: focus moves to the input.
  2. Press Tab into the field: the Trust ring appears.
  3. Make it invalid: the border turns destructive, and a screen reader reads the error after the label.
  4. Zoom to 200%: the text and the border stay visible and nothing is clipped.

API

Every prop comes from Base UI Input.