Capítulo 26 de 51
The plain single-part text input primitive — a controlled/uncontrolled <input> with the same shared field-state data attributes as every other form control, for when a control doesn't need NumberField/OTPField-style specialized formatting.
<Input /> — no sub-parts.<label> or Field.Label/Field.Root is required; no built-in visible label part.value/defaultValue/onValueChange — the same controlled/uncontrolled convention used throughout the library.| Part | Notable props | Notable data attributes |
|---|---|---|
Input | value/defaultValue/onValueChange | data-valid/data-invalid, data-dirty, data-touched, data-filled, data-focused, data-disabled |
Input for free-text fields; switch to NumberField (ch031) for numeric input with formatting/stepping, or OTPField (ch032) for fixed-length code entry — don't hand-roll those behaviors on top of Input.Field.Root rather than a bare <label> once the input needs validation/error display — it's the same Input either way, just with the accessibility/validation wiring added for free.