Input

A text input field with optional label and multiple size variants.

Preview

Default
With Label
Sizes
Disabled

Usage

tsx
import { Input } from "@semajsx/ui/components/input";

<Input placeholder="Enter your name" />
<Input label="Email" type="email" size="lg" />
<Input placeholder="Read only" readOnly />

Props

PropTypeDefaultDescription
type"text" | "email" | "password" | "number" | "search" | "url" | "tel""text"Input type
labelstring—Label text above the input
placeholderstring—Placeholder text
valuestring—Current value
size"sm" | "md" | "lg""md"Size preset
disabledbooleanfalseDisabled state
readOnlybooleanfalseRead-only state
namestring—HTML name attribute
idstring—HTML id attribute