The Input component provides an interface for users to input information and enables the application to process the submitted data.
import { Input } from "css-materials";
<Input placeholder='Basic Usage' />
<Input placeholder='Small' size='small' />
<Input placeholder='Medium' size='medium' />
<Input placeholder='Large' size='large' />
<Input type='password' placeholder='Enter password' label='Password' />
<div className="flex space-x-2.5">
<Input placeholder='Type your email address' size='small' className='w-full' />
<Button size='small'>Submit</Button>
</div>
<div className="flex space-x-2.5">
<Input placeholder='Type your email address' className='w-full' />
<Button>Submit</Button>
</div>
<div className="flex space-x-2.5">
<Input placeholder='Type your email address' size='large' className='w-full' />
<Button size='large'>Submit</Button>
</div>
<Input placeholder='Search' size='small' icon={<FiSearch />} />
<Input placeholder='Enter Text' size='medium' icon={<FiEdit />} />
<Input placeholder='Enter username' size='large' icon={<FiUser />} />
You can specify a pattern using regular expressions.
<Input placeholder="Type your email address" pattern="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$" errorMessage="Invalid email address" icon={<FiMail />} />