BDMG UI

Text Input

Single-line text input with optional label, error, and hint. Supports all native input props (placeholder, disabled, etc.).

Installation

tsx
import { TextInput } from "@workspace/ui/components/text-input"

Basic usage

tsx
<TextInput
  label="Email"
  placeholder="you@example.com"
/>

With error and hint

tsx
<TextInput
  label="Username"
  placeholder="johndoe"
  error="Username is already taken"
  hint="Choose a unique username"
/>

Sizes

tsx
<TextInput label="Small" size="sm" placeholder="Small" />
<TextInput label="Default" size="default" placeholder="Default" />
<TextInput label="Large" size="lg" placeholder="Large" />

Props

PropTypeDefaultDescription
labelstring-Label above the input.
errorstring-Error message shown below the input.
hintstring-Hint text below the input.
size"default" | "sm" | "lg""default"Input size.
containerClassNamestring-Classes for the wrapper.
inputClassNamestring-Classes for the input element.