input components for React.
Every state designed, every transition tuned, every edge case handled. Install it and the field already feels right.
$npmiyote-uiText input
One line, with room at either end for a mark or an affix
(Optional)
<Input
size="md"
label="Last name"
required
optional
info="We only use this on your invoices."
leading={<UserIcon />}
trailing={<SearchIcon size={20} />}
hint="This is a hint text to help users."
/>Digit input
Inputs for codes, keys, pins, passwords etcs
<PinInput
length={4}
label="Verification code"
hint="Enter the code we sent you."
onComplete={verify}
/>Text area
Multi-line entry, with a counter and a drag handle
(Optional)
<Textarea
size="md"
label="Input area"
required
optional
info="We only use this to improve the product."
maxLength={200}
hint="This is a hint text to help users."
/>Password
Masked entry, with a reveal toggle and live requirements
Forgot password
Must contain at least;
- At least 1 symbol, not met
- At least 1 uppercase, not met
- At least 1 number, not met
- At least 8 characters, not met
<PasswordInput
size="md"
label="Password"
info="Use something you have not used elsewhere."
forgotHref="/reset"
/>Phone number
A dialling country and a national number, in one field
(Optional)
<PhoneInput
size="md"
label="Phone number"
required
optional
info="We only use this to secure your account."
defaultCountry="US"
hint="This is a hint text to help users."
/>Select
A field that is its own search, and a small inline one
<SelectInput
label="Country"
options={[
{ value: 'fi', label: 'Finland' },
{ value: 'se', label: 'Sweden' },
]}
hint="Type to filter. The field is the search."
/>Date
Typed, not picked. The field types the slashes
(Optional)
⌘ + S
<DateInput
size="md"
label="Date"
required
optional
info="We only use this to schedule the run."
shortcut="⌘ + S"
hint="Typed, not picked. Paste works too."
/>Card number
Regroups itself as it recognises the card
(Optional)
<CardInput
size="md"
label="Card number"
required
optional
info="We never store the number."
hint="The mark follows the number. Try 3782 822463 10005."
/>Tags
A list you build by typing, inside the field or under it
<TagsInput
label="Ingredients"
tagsPosition="outside"
value={tags}
onChange={setTags}
placeholder="Type and press Enter"
/>