Phara UI v2.x

Input

Form inputs with sizes, variants, icons, and interactive states.

Basic

Default input component

Blade
<x-ui::input name="email" placeholder="Enter your email" />
Sizes

The default input size works great for most cases, but here are some additional size options for unique situations.

Blade
<x-ui::input name="large" size="lg" placeholder="Large input" />
With Icons

Automatically sized and styled icons for your inputs.

Blade
<x-ui::input name="email" icon="envelope" placeholder="Email address" />
Password Input

Password inputs include a toggle to show or hide the password value.

Click the eye icon to toggle visibility

Blade
<x-ui::input name="password" type="password" icon="lock-closed" placeholder="Password" />
Readonly

Readonly inputs automatically display a copy button for easy copying.

Click the copy icon to copy the value

Blade
<x-ui::input name="token" readonly value="your-api-token-here" />
With Label

Add a label prop to display a label above the input field.

Blade
<x-ui::input name="email" label="Email Address" icon="envelope" placeholder="you@example.com" />
Variants

Use the variant prop to change the visual style of the input.

Blade
<x-ui::input name="filled" variant="filled" placeholder="Filled variant" />
Disabled

Disabled inputs are non-interactive and visually muted.

Blade
<x-ui::input name="disabled" disabled value="Disabled input" />