Text Field
One component for the full .input-group markup: label (above/below/floating), prefix/suffix slots, helper/error/success text, and the built-in password-toggle / search-clear wiring.
Usage
import { TextField } from '@mav-labs-inc/mavkit-react'
<TextField label="Email" type="email" required />
<TextField label="Password" type="password" helperText="At least 8 characters" />
<TextField label="Amount" labelPosition="floating" prefix={<DollarIcon />} />
<TextField label="Email" errorText="Enter a valid email address" />Examples
Basic
At least 8 characters
Label position
Helper, error, and success text
errorText takes priority over successText, which takes priority over helperText.
That username is taken
Looks good
Shown on your public profile
Search
type="search" renders a built-in clear button once there’s a value (set clearable={false} to opt out).
Props
TextField accepts every native <input> attribute (except className, size, prefix, suffix, which are repurposed below) in addition to the props below.
Last updated on