Appearance
Input
The Input component is a styled text input that provides consistent theming across your application.
Import
tsx
import { Input } from "@tailor-platform/app-shell";Basic Usage
tsx
function BasicUsage() {
return <Input placeholder="Enter your name" />;
}Props
Accepts all standard HTML <input> props.
| Prop | Type | Default | Description |
|---|---|---|---|
type | string | "text" | HTML input type |
placeholder | string | - | Placeholder text |
disabled | boolean | false | Disables the input |
className | string | - | Additional CSS classes |
Examples
Text Input
tsx
function TextInput() {
return <Input type="text" aria-label="Name" placeholder="Enter your name" />;
}Email Input
tsx
function EmailInput() {
return <Input type="email" aria-label="Email" placeholder="you@example.com" />;
}Number Input
tsx
function NumberInput() {
return <Input type="number" aria-label="Quantity" placeholder="0" min={0} max={100} />;
}Disabled Input
tsx
function DisabledInput() {
return <Input aria-label="Unavailable value" value="Read-only value" disabled />;
}With onChange Handler
tsx
const [value, setValue] = useState("");
<Input value={value} onChange={(e) => setValue(e.target.value)} placeholder="Type something..." />;TypeScript
typescript
import { type InputProps } from "@tailor-platform/app-shell";