"use client";
import { TextField } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
invalid | boolean | — | Marks the control invalid (aria-invalid); FormField sets it from error. |
size | ComponentSize | — | Size from the shared scale (xs, sm, md, lg). |
clearLabel | string | "Clear" from the catalog | Accessible name of the clear button (default "Clear" from the catalog). |
leading | ReactNode | — | Content before the main content (icon, prefix). |
onClear | () => void | — | Shows a clear button while the field has a value; called when it is pressed. |
onValueChange | (value: string, event: ChangeEvent<HTMLInputElement>) => void | — | Called with the new value (only when it changes). |
trailing | ReactNode | — | Content after the main content (icon, suffix). |
invalidboolean
Marks the control invalid (aria-invalid); FormField sets it from error.
sizeComponentSize
Size from the shared scale (xs, sm, md, lg).
clearLabeldefault "Clear" from the catalogstring
Accessible name of the clear button (default "Clear" from the catalog).
leadingReactNode
Content before the main content (icon, prefix).
onClear() => void
Shows a clear button while the field has a value; called when it is pressed.
onValueChange(value: string, event: ChangeEvent<HTMLInputElement>) => void
Called with the new value (only when it changes).
trailingReactNode
Content after the main content (icon, suffix).
Other props are passed to the root element (InputHTMLAttributes<HTMLInputElement>), including className, style, id and aria-* attributes.
Complex object props use fixed fixtures. Primitive props stay editable.
<TextField aria-label="TextField" size="md" invalid={false} disabled={false} placeholder="Title" /><TextField aria-label="Title" /><TextField aria-label="TextField" size="md" invalid={false} disabled={false} placeholder="Title" />