Forms

Input

A text field with label, helper text, error state and optional prefix/suffix slots.

data-scope="input"

Usage

import { Input } from "@crosskit-ui/react";

<Input label="Email" type="email" helperText="We never share it." />
<Input label="Email" type="email" helper-text="We never share it." />
<Input label="Email" type="email" helperText="We never share it." />
<input ckInput label="Email" type="email" helperText="We never share it." />

Props

PropTypeDefaultNotes
variant"default" | "filled" | "outline""default"Field style. v0 had Input take `outline` and Textarea `outlined`.
size"sm" | "md" | "lg""md"Control size.
labelReactNodeLabel, associated by id.
helperTextReactNodeHint below the field.
invalidbooleanfalseMarks the field invalid. v0 called this `error`.
errorMessageReactNodeReplaces helperText and wins aria-describedby.
fullWidthbooleantrueStretch to 100%.
prefixReactNodeContent before the input.
suffixReactNodeContent after the input.

Prop names are identical in all four frameworks. Only two-way binding differs, and each framework uses its own idiom over the same underlying prop.

Migrating from react-ui-toolkit

v0v1Notes
errorinvalid