Input

Text input fields for collecting user data with various formats and enhancements.

When to Use

  • For single-line text entry (usernames, emails, etc.)
  • For multi-line text with TextArea
  • For search inputs, password fields, and OTP inputs

Import

import { Input } from "orizon";

Examples

Basic

<Input placeholder="Basic input" />

Sizes

<Input size="large" placeholder="Large" />
<Input placeholder="Default" />
<Input size="small" placeholder="Small" />

With Prefix/Suffix

import { User } from "lucide-react";

<Input prefix={<User size={16} />} placeholder="Username" />

Password

<Input.Password placeholder="Enter password" />

TextArea

<Input.TextArea rows={4} placeholder="Enter description..." />
<Input.Search placeholder="Search..." enterButton onSearch={onSearch} />

Status

<Input status="error" placeholder="Error" />
<Input status="warning" placeholder="Warning" />

With Character Count

0 / 20
<Input showCount maxLength={20} placeholder="Max 20 chars" />

API

InputProps

  • valuestring — Input value (controlled)
  • defaultValuestring — Default value
  • onChange(e: ChangeEvent) => void — Change handler
  • size"small" | "middle" | "large" — Input size (default: "middle")
  • variant"outlined" | "filled" | "borderless" — Visual variant
  • status"error" | "warning" — Validation status
  • prefixReactNode — Prefix element
  • suffixReactNode — Suffix element
  • allowClearboolean — Show clear button
  • placeholderstring — Placeholder text
  • maxLengthnumber — Maximum character count
  • showCountboolean — Show character count
  • disabledboolean — Disable input

Input.Password Props

Inherits all InputProps plus:

  • visibilityToggleboolean — Show toggle button (default: true)

Input.TextArea Props

Inherits most InputProps plus:

  • rowsnumber — Visible rows
  • autoSizeboolean | { minRows, maxRows } — Auto-resize

Input.Search Props

Inherits all InputProps plus:

  • enterButtonboolean | ReactNode — Show search button
  • onSearch(value: string) => void — Search callback