Behive Tech Registry

Text Field

v0.3.0

A bare text input — the native `<input>` is this component's own root element. It has no built-in label/hint/error; wrap it in `FormField` for that chrome. Works standalone too — not every input needs the full form suite.

pnpm add @behivetech/atoms.text-field

A bare text input — the native <input> is this component's own root element. It has no built-in label/hint/error; wrap it in FormField for that chrome. Works standalone too — not every input needs the full form suite.

Usage

Pass aria-invalid="true" to visually mark the field as invalid (pair with FormField's error prop for the message).

Props

Extends the native <input> element's attributes (minus size, which conflicts with a future sizing prop) with:

PropTypeDefaultDescription
classNamestring—Additional class names

Compositions

Open all 4 →

Properties

TextField props

PropTypeDefaultDescription
classNamestring—Additional class names to merge with the component root element

Also accepts the native attributes of its root element (className, aria-*, event handlers, …).