Browse Components
Input
Native text entry with clear labels and useful states.
Basic
A visible label and linked help text give the input a clear purpose. No JavaScript is required.
Choose a name your team will recognize.
View Code
<div class="field">
<label for="project-name">
Project name
</label>
<input
class="input"
id="project-name"
name="project"
type="text"
placeholder="Website refresh"
aria-describedby="project-help"
>
<p id="project-help" class="muted">
Choose a name your team will recognize.
</p>
</div>Types and autofill
Use native types and autocomplete tokens. Email keyboards and validation come from the browser; your server still validates submissions.
View Code
<div class="grid">
<div class="field">
<label for="full-name">
Full name
</label>
<input class="input" id="full-name" name="name" autocomplete="name">
</div>
<div class="field">
<label for="email">
Email address (required)
</label>
<input
class="input"
id="email"
name="email"
type="email"
autocomplete="email"
required
placeholder="[email protected]"
>
</div>
</div>Invalid
A static validation example: the dashed boundary and explicit correction make the error visible without relying on color. Your application updates both message and aria-invalid.
Error: enter a complete email address, such as [email protected].
View Code
<div class="field">
<label for="invalid-email">
Email address
</label>
<input
class="input"
id="invalid-email"
name="email"
type="email"
autocomplete="email"
value="alex@"
aria-invalid="true"
aria-describedby="email-error"
>
<p class="field-error" id="email-error">
Error: enter a complete email address, such as [email protected].
</p>
</div>Disabled and read-only
Disabled values are excluded from submission and keyboard navigation. Read-only values can still be focused, selected, copied, and submitted.
Only the workspace owner can change this.
View Code
<div class="grid">
<div class="field">
<label for="locked-name">
Workspace name
</label>
<input
class="input"
id="locked-name"
name="workspace"
value="Design team"
disabled
aria-describedby="locked-help"
>
<p id="locked-help" class="muted">
Only the workspace owner can change this.
</p>
</div>
<div class="field">
<label for="reference">
Reference
</label>
<input class="input" id="reference" name="reference" value="PROJECT-1042" readonly>
</div>
</div>Size and width
Default controls keep a 44px minimum target; large controls use 52px. Field fills available width and grid adapts to narrow screens.
View Code
<div class="grid">
<div class="field">
<label for="default-input">
Default
</label>
<input class="input" id="default-input" name="default">
</div>
<div class="field">
<label for="large-input">
Large
</label>
<input class="input input-large" id="large-input" name="large">
</div>
</div>Right-to-left
Labels and layout follow the document direction. Keep email addresses and other left-to-right identifiers in their natural direction.
השתמשו בשם המועדף עליכם.
View Code
<div class="field" dir="rtl" lang="he">
<label for="hebrew-name">
שם מלא
</label>
<input
class="input"
id="hebrew-name"
name="name"
autocomplete="name"
placeholder="הזינו את שמכם"
>
<p class="muted">
השתמשו בשם המועדף עליכם.
</p>
</div>Without motion
Color feedback uses shared 300ms transitions. Focus appears immediately; reduced-motion preferences or data-motion=none disable transitions.
View Code
<div class="field" data-motion="none">
<label for="quiet-input">
Project title
</label>
<input class="input" id="quiet-input" name="title" placeholder="Enter a title">
</div>Installation
Download these files into the matching paths in your project, or use Create to assemble a kit. Include each dependency once. Do not also load app.css.
<link rel="stylesheet" href="/library/assets/base.css">
<link rel="stylesheet" href="/library/assets/field.css">10,780 bytes CSS including base · 0 bytes runtime JavaScript
Usage
Start with a label
Group a visible label, input.input, and help text in .field. Connect the label with for and a unique input id.
Help people enter data
Choose the right type, autocomplete, and inputmode. Keep placeholders as examples and allow paste and password managers.
Explain errors
Link help and errors with aria-describedby. Set aria-invalid="true" after validation and explain the fix. Your server still needs to validate submissions.
Building with AI? The AI Manifest has these notes and the full contract. See the AI Guide.