Forms
Input
A single-line text field with a built-in label, caption, error, leading icon and three sizes. Exported as TextInput and as Input.
Group: Forms. Exports: TextInput. shadcn/ui equivalent: Input (matches).
Usage
import { TextInput } from "./halaska-kit";
TextInput props
valueany: The controlled value.onChange(value) => void: Called with the new value.placeholderstring: Hint shown while empty.labelstring: Visible label.captionstring: Helper text under the control.errorstring: Error message. Turns the border red and replaces the caption.iconReactNode: Icon shown before the content.disabledboolean: Prevents interaction and dims the control.typestring(default "text"):sizestring(default "md"): Size of the control.styleCSSProperties: Inline style merged onto the root element."aria-label"any:
Accessibility
- Renders a native input, so typing, selection and autofill behave as usual.
- A string label becomes the input's aria-label. The visible label is not tied to it with an id.
- An error sets aria-invalid. The message is not linked with aria-describedby.
- Focus is shown by a border change rather than a ring.
Halaska UI · Components · Patterns · Screens · Install