Input
Foundation text inputs for login forms, filters, search flows, and structured data entry experiences.
Component preview
Explore the available states and the real library behavior for this component.
zyra-form-field + zyra-input
Smart wrapper + pure CVA input — Reactive & Template Forms
zyra-form-field — label, hint, icons, counter
zyra-input — pure CVA, no chrome
Use zyra-input standalone inside toolbars, tables etc.
<zyra-form-field
label="Email"
hint="We'll never share it"
successHint="Valid email"
appearance="outline"
>
<zyra-input type="text" formControlName="email" />
</zyra-form-field>
// Component:
readonly appIcons = appIcons;
form = new FormGroup({
email: new FormControl('', [Validators.required, Validators.email])
});Copy-paste example
Drop this into your Angular standalone component and it works out of the box.
import { Component } from '@angular/core';
import { ZyraInput } from 'zyra-ng-ui';
@Component({
selector: 'app-demo-input',
standalone: true,
imports: [ZyraInput],
template: `
<zyra-input
type="email"
size="md"
placeholder="name@company.com"
/>
`,
})
export class DemoInputComponent {}
Variants
All the visual modes and states available for this component.
defaultStandard text/email/password field
with prefix iconIcon inside the leading edge of the field
with clear buttonShows x button to clear the value
disabledNon-interactive state with muted styling
errorRed border and error icon for invalid state
API
All inputs and configuration options for zyra-input.
| Prop | Type | Default | Description |
|---|---|---|---|
type | 'text' | 'email' | 'password' | 'search' | 'url' | 'number' | 'text' | Native input type |
size | 'sm' | 'md' | 'lg' | 'md' | Height and font scale |
placeholder | string | - | Placeholder text shown when empty |
disabled | boolean | false | Disables the input |
value | string | - | Two-way bound value via ngModel |
Accessibility
Built to meet WCAG 2.0 AA. These notes cover the key ARIA, keyboard, and interaction behaviours.
- Always associate an input with a visible <label> or use aria-label
- Pair with ZyraFormField to get proper label and hint associations automatically
- Error state sets aria-invalid="true"; pair with an error message element using aria-describedby