In context
Realistic compositions — sign-in, filter bar, profile editor with live invalid state, and a tokenized payment form.
Welcome back
Sign in to your MiHCM workspace.
or
Employee directory
248 records · 12 departments
23 matches
Profile details
Invalid state shown live as you type.
Must include an `@` symbol.
Billing details
Card details are tokenized and never stored.
Default
import { Input } from '@mihcm/ui/Input';
<Input placeholder="Email address" />Email with leading icon
import { Input } from '@mihcm/ui/Input';
import { Mail } from '@mihcm/icons';
<Input
type="email"
placeholder="you@example.com"
leadingIcon={<Mail className="size-4" />}
/>Search
import { Search } from '@mihcm/icons';
<Input
type="search"
placeholder="Search components…"
leadingIcon={<Search className="size-4" />}
/>Required, with validation error
const [email, setEmail] = useState('');
const error = email && !email.includes('@') ? 'Enter a valid email' : null;
<>
<label htmlFor="email" className="text-sm font-medium">
Email <span className="text-destructive">*</span>
</label>
<Input
id="email"
type="email"
required
value={email}
onChange={(e) => setEmail(e.target.value)}
invalid={!!error}
aria-describedby={error ? 'email-error' : undefined}
/>
{error && (
<p id="email-error" className="mt-1 text-sm text-destructive">
{error}
</p>
)}
</>Disabled
<Input defaultValue="locked@example.com" disabled />All sizes
<div className="flex flex-col gap-2 max-w-sm">
<Input size="sm" placeholder="Small (36px)" />
<Input size="md" placeholder="Medium (40px) — default" />
<Input size="lg" placeholder="Large (48px) — mobile target" />
</div>React Native
import { Input } from '@mihcm/ui/Input';
<Input
size="lg"
placeholder="Email address"
accessibilityLabel="Email address"
keyboardType="email-address"
autoCapitalize="none"
autoCorrect={false}
/>