Input component is used for text input fields with support for labels, validation, icons, loading states, and more. It's a highly configurable component that integrates with form systems.tsx
import { Input } from "@arkyn/components";
name property.tsx
<Input name="basic-input" placeholder="Enter something..." />
md and lg. Each size offers a different height and padding to suit your layout needs.tsx
<Input name="input-md" placeholder="Medium size" size="md" /><Input name="input-lg" placeholder="Large size" size="lg" />
solid, outline, and underline. Each variant offers a different visual style to suit your interface design.tsx
<Input name="input-solid" placeholder="Solid variant" variant="solid" /><Input name="input-outline" placeholder="Outline variant" variant="outline" /><Input name="input-underline" placeholder="Underlined variant" variant="underline" />
tsx
<Input name="username" label="Username" placeholder="Enter your username" />
tsx
<Inputname="search"label="Search"placeholder="Type to search..."leftIcon={Search}/>
tsx
<Inputname="filter-search"label="Filter search"placeholder="Type and use the filter..."rightIcon={Filter}/>
R$
tsx
<Input name="money" label="My wallet" placeholder="100.00" prefix="R$" />
tsx
<Input name="day" label="Your birthday month" suffix={Calendar1} />
tsx
<Inputname="email-type"label="Email"type="email"placeholder="user@example.com"leftIcon={Mail}/><Inputname="password-type"label="Password"type="password"placeholder="Enter your password"leftIcon={Lock}/><Inputname="tel-type"label="Phone"type="tel"placeholder="(11) 99999-9999"leftIcon={Phone}/>
tsx
<Inputname="disabled-input"label="Disabled field"placeholder="This field is disabled"disabled/>
tsx
<Inputname="readonly-input"label="Read-only field"value="This value cannot be edited"readOnly/>
rightIcon.tsx
<Inputname="loading-left"label="Loading (left)"placeholder="Loading..."isLoading/><Inputname="loading-right"label="Loading (right)"placeholder="Loading..."rightIcon={Search}isLoading/>
errorMessage property, it will take precedence over messages from the form provider.tsx
<Inputname="invalid-email"label="Email"placeholder="Enter your email"errorMessage="Please enter a valid email"leftIcon={Mail}showAsterisk/>
name - string (required)
Name of the field for form manipulationlabel - string
Label text to display above the inputvalue - string
Field valuedefaultValue - string
Uncontrolled initial value of the fielderrorMessage - string
Error message to display below the inputisLoading - boolean (default: false)
Controls the loading state with a spinnersize - "md" | "lg" (default: "md")
Input sizevariant - `"solid" | "outline" | "underline" (default: "solid")
Visual variant of the inputprefix - string | LucideIcon
Text or icon to display at the beginning of the inputsuffix - string | LucideIcon
Text or icon to display at the end of the inputshowAsterisk - boolean
Whether to display an asterisk in the label for required fieldsleftIcon - LucideIcon
Optional icon to display on the left siderightIcon - LucideIcon
Optional icon to display on the right side<input> are also supported, except size, prefix, and name.hidden type are rendered with display: none