Forms
Input
A text input styled with the hl-input primitive.
A text input styled with the hl-input primitive. It is a native <input>, so validation, autofill, and form behavior all work exactly as the browser intends, with no JavaScript.
Playground
Props
The framework bindings expose these props (and forward the rest to the root element).
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'md' | 'lg' | 'md' | Control height and font size. |
invalid | boolean | false | Apply the error state and set `aria-invalid`. |
CSS variables
Override these on any ancestor to theme the component. See the theme studio to preview changes live.
| CSS variable | Used for |
|---|---|
--hl-border | Resting border color. |
--hl-ring | Focus ring color. |
--hl-radius-md | Corner radius. |
--hl-control-height-md | Default height. |
Accessibility
- A native
<input>, so labels, autofill, and constraint validation behave normally. - Pair
invalidwith a visible message andaria-describedbyfor the best screen-reader experience. - Focus is shown with the shared
--hl-ringtoken, never removed.