Input
Text input with labels, descriptions, icons, and error display.
Basic input
<x-boson::input name="basic" placeholder="Enter text..." />
With label
<x-boson::input name="email" label="Email address" type="email" placeholder="you@example.com" />
With description
This will be your public display name.
<x-boson::input
name="username"
label="Username"
description="This will be your public display name."
placeholder="johndoe"
/>
With icons
<x-boson::input name="search" icon="magnifying-glass" placeholder="Search..." />
<x-boson::input
name="email_icon"
label="Email"
icon="envelope"
icon:trailing="check"
placeholder="you@example.com"
/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label |
string |
null |
Input label text |
description |
string |
null |
Helper text displayed below the input |
name |
string |
null |
Input name, also enables validation error display |
icon |
string |
null |
Leading Heroicon name |
icon:trailing |
string |
null |
Trailing Heroicon name |