Skip to Content
ComponentsTextBox

TextBox

TextBox renders Windows 98 single-line inputs and multiline text areas with optional labels.

Props

PropTypeDefaultDescription
label / childrenReactNode-Associated label content.
value / defaultValuestring-Controlled or uncontrolled text value.
onValueChange(value: string) => void-Value-level text change callback for controlled usage.
labelPosition'left' | 'top''left'Label layout.
multilinebooleanfalseRenders a textarea with custom scrollbars.
rowsnumber-Visible textarea rows.
typetext-like input type'text'Native input type for single-line mode.

Examples

Input states

ARIA

When label or children are provided, TextBox links the label to the field with htmlFor and a generated id.

Keyboard

TextBox keeps native input and textarea keyboard behavior, including text editing, selection, Tab focus movement, and multiline scrolling.

SSR

Prefer defaultValue for uncontrolled fields or provide a stable controlled value. Pixel-font fields reserve left padding so glyphs do not clip against the sunken border.

Last updated on