Beacon / Form Inputs / Text Field Text Field The inherited Ecology text input, wearing the Beacon skin. Label, input, and help/error text in one form-associated Web Component; its focus ring picks up brand teal from --color-primary.
Inherited wc import '@esa/ecology/esa-text-field';
Preview
Show code Copy
< esa-text-field label = " Full name " placeholder = " Jane Doe " help-text = " As it appears on the permit. " ></ esa-text-field > Types
Show code Copy
< esa-text-field label = " Email " type = " email " placeholder = " you@example.com " ></ esa-text-field >
< esa-text-field label = " Password " type = " password " ></ esa-text-field >
< esa-text-field label = " Count " type = " number " ></ esa-text-field > Sizes
Show code Copy
< esa-text-field label = " Extra small " size = " xs " placeholder = " Extra small " ></ esa-text-field >
< esa-text-field label = " Small " size = " sm " placeholder = " Small " ></ esa-text-field >
< esa-text-field label = " Medium " size = " md " placeholder = " Medium " ></ esa-text-field >
< esa-text-field label = " Large " size = " lg " placeholder = " Large " ></ esa-text-field > States
Show code Copy
< esa-text-field label = " Required " required placeholder = " Cannot be empty " ></ esa-text-field >
< esa-text-field label = " With error " error-text = " This field is required. " required ></ esa-text-field >
< esa-text-field label = " Disabled " disabled value = " Read only " ></ esa-text-field > API Prop Type Default Description label string '' Visible label rendered above the input. type 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' 'text' Native input type. value string '' Current value; mirrored to the form on every input. placeholder string '' Placeholder shown when empty. help-text string '' Helper text shown below the input. error-text string '' Error message; replaces help text and turns the field red when present. size 'xs' | 'sm' | 'md' | 'lg' 'md' Control size. required boolean false Marks the field required and renders an asterisk on the label. disabled boolean false Disables interaction.
Events Event Type Default Description change CustomEvent<{ value: string }> — Fired on every input. Composed and bubbling; detail.value is the current string.