Input
A labeled field for a short typed value.
In Multi-brand
See it live
npm run storybookWhen to use it
In Multi-brand: Sign-up and account fields.
- Use it when: A name, email, phone number or other one-line answer.
- Not when: Long text (textarea), or a closed choice (radio group, select or checkbox).
Instead:
How Multi-brand uses it
Words
- Shared structure: object, state, next step.
- Brand tone lives in headlines and marketing copy, not in errors.
- Errors and confirmations read the same in every brand.
- Use: Get started, Plan, Order. Avoid: Brand-specific words in errors, Jargon.
The labels components use, from the voice tokens:
content.action.commit: Savecontent.action.cancel: Cancelcontent.action.destroy: Removecontent.action.retry: Try againcontent.action.empty-action: Get started
See Voice and tone for the whole voice.
Accessibility and keyboard
Test before you ship:
- A visible label, never a placeholder as the only label. undefined
Use it in code
npx open-ds add input
The component reads only component keys and semantic tokens, so it follows the brand and mode on <html>.
Tokens it reads
Input reads 17 tokens of its own, each an alias of a semantic token. Each row is one part: its own token, the semantic it aliases, and the value it ends at. Change a semantic and every component that reads it follows; override one of Input's tokens to change Input alone.
Multi-brand decides what changes when you switch theme. Here a switch changes colors, type and shape, so the marked rows differ between its brands and between light and dark; everything else holds steady.
| Part | Its token and the semantic it aliases | Value |
|---|---|---|
| Input | ||
| Fill Changes with theme | component.input.backgroundcolor.surface.defaultvar(--input-background) | Aster Lightslate-deep.light.0:#FFFFFFAster Darkslate-deep.dark.50:#0F172ABirch Lightslate-deep.light.0:#FFFFFFBirch Darkslate-deep.dark.50:#0F172ACoral Lightslate-deep.light.0:#FFFFFFCoral Darkslate-deep.dark.50:#0F172A |
| Text Changes with theme | component.input.textcolor.text.primaryvar(--input-text) | Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC |
| Placeholder Changes with theme | component.input.placeholdercolor.text.mutedvar(--input-placeholder) | Aster Lightslate-deep.light.600:#4B5A6FAster Darkslate-deep.dark.400:#96A3B5Birch Lightslate-deep.light.600:#4B5A6FBirch Darkslate-deep.dark.400:#96A3B5Coral Lightslate-deep.light.600:#4B5A6FCoral Darkslate-deep.dark.400:#96A3B5 |
| Height | component.input.heightsize.control.defaultvar(--input-height) | size.44:2.75rem |
| Padding, left and right | component.input.padding-xspace.inset.control-xvar(--input-padding-x) | space.16:1rem |
| Corner Changes with theme | component.input.radiusradius.controlvar(--input-radius) | Aster Lightradius.4:0.25remAster Darkradius.4:0.25remBirch Lightradius.12:0.75remBirch Darkradius.12:0.75remCoral Lightradius.999:9999pxCoral Darkradius.999:9999px |
| Text size | component.input.font-sizetype.body.font-sizevar(--input-font-size) | font.size.16:1rem |
| Font family Changes with theme | component.input.font-familytype.body.font-familyvar(--input-font-family) | Aster Lightfont.family.inter:Inter, system-ui, sans-serifAster Darkfont.family.inter:Inter, system-ui, sans-serifBirch Lightfont.family.plus-jakarta-sans:"Plus Jakarta Sans", system-ui, sans-serifBirch Darkfont.family.plus-jakarta-sans:"Plus Jakarta Sans", system-ui, sans-serifCoral Lightfont.family.poppins:Poppins, system-ui, sans-serifCoral Darkfont.family.poppins:Poppins, system-ui, sans-serif |
| Border width | component.input.border-widthborder-width.defaultvar(--input-border-width) | border-width.1:1px |
| Focus on focus | component.input.focusborder-width.focusvar(--input-focus) | border-width.2:2px |
| Canvas Changes with theme on focus | component.input.canvascolor.surface.canvasvar(--input-canvas) | Aster Lightslate-deep.light.50:#F8FAFCAster Darkslate-deep.dark.0:#020617Birch Lightslate-deep.light.50:#F8FAFCBirch Darkslate-deep.dark.0:#020617Coral Lightslate-deep.light.50:#F8FAFCCoral Darkslate-deep.dark.0:#020617 |
| Danger Changes with theme when invalid | component.input.dangercolor.status.dangervar(--input-danger) | Aster Lightred.light.600:#C42B2BAster Darkred.dark.600:#F28B8BBirch Lightred.light.600:#C42B2BBirch Darkred.dark.600:#F28B8BCoral Lightred.light.600:#C42B2BCoral Darkred.dark.600:#F28B8B |
| Border | ||
| Color Changes with theme | component.input.bordercolor.border.strongvar(--input-border) | Aster Lightslate-deep.light.500:#64748BAster Darkslate-deep.dark.400:#96A3B5Birch Lightslate-deep.light.500:#64748BBirch Darkslate-deep.dark.400:#96A3B5Coral Lightslate-deep.light.500:#64748BCoral Darkslate-deep.dark.400:#96A3B5 |
| Focus Changes with theme on focus | component.input.border.focuscolor.border.focusvar(--input-border-focus) | Aster Lightteal.light.600:#0F766EAster Darkteal.dark.600:#7FCFC6Birch Lightpurple.light.600:#6D28D9Birch Darkpurple.dark.600:#B79DF7Coral Lightorange.light.600:#C2410CCoral Darkorange.dark.600:#F7A67F |
| Disabled | ||
| Fill Changes with theme when disabled | component.input.disabled.backgroundcolor.disabled.surfacevar(--input-disabled-background) | Aster Lightslate-deep.light.100:#F1F5F9Aster Darkslate-deep.dark.100:#1E293BBirch Lightslate-deep.light.100:#F1F5F9Birch Darkslate-deep.dark.100:#1E293BCoral Lightslate-deep.light.100:#F1F5F9Coral Darkslate-deep.dark.100:#1E293B |
| Border Changes with theme when disabled | component.input.disabled.bordercolor.disabled.bordervar(--input-disabled-border) | Aster Lightslate-deep.light.200:#E2E8F0Aster Darkslate-deep.dark.200:#334155Birch Lightslate-deep.light.200:#E2E8F0Birch Darkslate-deep.dark.200:#334155Coral Lightslate-deep.light.200:#E2E8F0Coral Darkslate-deep.dark.200:#334155 |
| Text Changes with theme when disabled | component.input.disabled.textcolor.disabled.textvar(--input-disabled-text) | Aster Lightslate-deep.light.500:#64748BAster Darkslate-deep.dark.500:#CBD5E1Birch Lightslate-deep.light.500:#64748BBirch Darkslate-deep.dark.500:#CBD5E1Coral Lightslate-deep.light.500:#64748BCoral Darkslate-deep.dark.500:#CBD5E1 |