Skip to content

Forms

Input

A text input styled with the hl-input primitive.

stableNo JS requiredBuilt on <input>hydrateless/input.css

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

Live

Props

The framework bindings expose these props (and forward the rest to the root element).

PropTypeDefaultDescription
size'sm' | 'md' | 'lg''md'Control height and font size.
invalidbooleanfalseApply 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 variableUsed for
--hl-borderResting border color.
--hl-ringFocus ring color.
--hl-radius-mdCorner radius.
--hl-control-height-mdDefault height.

Accessibility

  • A native <input>, so labels, autofill, and constraint validation behave normally.
  • Pair invalid with a visible message and aria-describedby for the best screen-reader experience.
  • Focus is shown with the shared --hl-ring token, never removed.

Released under the MIT License.