- Docs
- Components
- Forms
Input
The bare text box: a filled surface with a bottom line, an icon and affixes. A Field labels it.
- Import
- @qeetrix/react
- Status
- StableSince 0.0.2
- Renders
<input>Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Playground
Every prop, live, and the code it takes.
₹
Icon
import { Field, Input } from "@qeetrix/react";
<Field label="Amount">
<Input placeholder="e.g. 50,000" startAdornment="₹" />
</Field>02
In a field
Field gives it a label, a description and an error; TextField is the two in one.
As on your GST certificate.
<Field label="Legal name" description="As on your GST certificate.">
<Input defaultValue="Acme Private Limited" />
</Field>03
Icon and affixes
A leading icon; text before or after the value, in the box.
₹
%
.qeet.in
<Stack gap="lg">
<Field label="Amount"><Input startAdornment="₹" defaultValue="1,24,500" /></Field>
<Field label="Discount"><Input endAdornment="%" defaultValue="12" /></Field>
<Field label="Subdomain"><Input endAdornment=".qeet.in" defaultValue="acme" /></Field>
</Stack>04
Large
size="lg" for the one value a sign-in or sign-up step asks for: taller, the value in title type with tabular figures. That step's one field only.
+91
<Field label="Phone number"><Input size="lg" type="tel" startAdornment="+91" placeholder="98765 43210" /></Field>05
With a tool
endAdornment holds a control too: a Copy button beside a read-only key.
<Field label="Client ID">
<Input readOnly defaultValue="qid_app_01J9ZK4T7B2R" endAdornment={<CopyButton value="qid_app_01J9ZK4T7B2R" label="Copy client ID" size="sm" />} />
</Field>06
Search in a toolbar
The one place a label hides: hideLabel keeps it for screen readers.
<Field label="Search users" hideLabel>
<Input type="search" icon={SearchIcon} placeholder="Name, email or ID" />
</Field>