Reference: Elevate Lookbook | Specs: DESIGN.md line 444-458
<div class="elv-text-input">
<input
type="text"
class="elv-text-input__field"
placeholder="Enter text..."
aria-label="Text input"
/>
</div>
<!-- Text -->
<input type="text" class="elv-text-input__field" />
<!-- Email -->
<input type="email" class="elv-text-input__field" placeholder="you@example.com" />
<!-- Password with toggle -->
<div class="elv-input-wrapper">
<input type="password" class="elv-text-input__field elv-text-input__field--password" />
<button class="elv-password-toggle material-symbols-outlined" aria-label="Toggle password">
visibility
</button>
</div>
<!-- Number -->
<input type="number" class="elv-text-input__field" />
<!-- URL -->
<input type="url" class="elv-text-input__field" placeholder="https://example.com" />
<!-- Tel -->
<input type="tel" class="elv-text-input__field" placeholder="(555) 123-4567" />
Focus state: 3px light purple outline (#c3bde5)
Please enter a valid email address
Choose a unique username (letters and numbers only)
<!-- Error State -->
<input
class="elv-text-input__field elv-text-input__field--error"
aria-invalid="true"
aria-describedby="error-id"
/>
<p id="error-id" class="elv-input-error" role="alert">Error message</p>
<!-- Disabled -->
<input class="elv-text-input__field" disabled />
<!-- With Label -->
<label class="elv-input-label" for="input-id">Label</label>
<input id="input-id" class="elv-text-input__field" />
<!-- With Helper Text -->
<input class="elv-text-input__field" />
<p class="elv-input-helper">Helper text</p>
<!-- Required -->
<label class="elv-input-label">
Label <span class="elv-required">*</span>
</label>
<input class="elv-text-input__field" required aria-required="true" />
48px height for improved accessibility
<div class="elv-text-input elv-text-input--lg">
<input type="text" class="elv-text-input__field" />
</div>
for and id attributesaria-label when label is not visiblearia-invalid="true" and aria-describedby for error messagesrequired attribute and aria-required="true"aria-label="Toggle password visibility" on toggle buttonaria-describedby to link helper text to input| Property | Value | Token |
| Background | #fafafa | N5 |
| Border | 0.5px solid #b0afb6 | border-medium N40 |
| Border Radius | 8px | radius-sm |
| Height (default) | 40px | — |
| Height (large) | 48px | — |
| Padding | 0 8px | — |
| Font Size | 16px | Body |
| Font Weight | 400 | Regular |
| Line Height | 24px | — |
| Text Color | #201f23 | text-default |
| Placeholder Color | #6f6d78 | text-nonessential |
| Focus State | 3px solid #c3bde5 outline, 1px offset | P40 |
| Error State | 2px solid #eb2000 | R120 |
| Disabled Background | #fcfcfd | N1 |
| Disabled Text | #b0afb6 | N40 |
| Label Font Size | 14px | Label Sm |
| Label Font Weight | 600 | Semibold |
| Helper Text Size | 12px | — |
| Helper Text Color | #6f6d78 | text-nonessential |
| Error Message Size | 12px | — |
| Error Message Weight | 600 | Semibold |
| Error Message Color | #b21800 | R140 |
| Element | Spacing |
| Label to input | 4px (space-1) |
| Input to helper text | 4px (space-1) |
| Input to error message | 4px (space-1) |
| Between form fields | 16px (space-4) |