Back to componentszyra-form-field
Form Field
Component preview
Explore the available states and the real library behavior for this component.
Live previewZyraFormField
zyra-form-field + zyra-input
Smart wrapper + pure CVA input — Reactive & Template Forms
Controls
type
appearance
size
prefixIcon
suffixIcon
hint
successHint
maxLength
features
Architecture
zyra-form-field — label, hint, icons, counter
zyra-input — pure CVA, no chrome
Use zyra-input standalone inside toolbars, tables etc.
Live Preview outline md text
Generated Code
<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])
}); Event Log 0
Interact with the input above to see events
Appearances 3 variants
appearance="outline"
appearance="filled"
appearance="underline"
Real World Forms Reactive Forms
Login
Welcome back
Register
Create your account
Profile Settings
Update your info
All Validators Blur each to trigger
0 / 10
zyra-input Standalone No zyra-form-field needed
Search bar
Inside a table cell
Usage code
zyra-form-field
import { Component } from '@angular/core';
import { ZyraFormField, ZyraInput } from 'zyra-ng-ui';
@Component({
selector: 'app-demo-form-field',
standalone: true,
imports: [ZyraFormField, ZyraInput],
template: `
<zyra-form-field
label="Email"
hint="We'll only use this for account updates."
>
<zyra-input
type="email"
placeholder="name@company.com"
/>
</zyra-form-field>
`,
})
export class DemoFormFieldComponent {}
Helps compose accessible formsSupports helper and error textKeeps spacing consistent