Argent

Input

One line of text.

We never share it.

Enter a postcode, like SW1A 1AA.

import { Input } from '@rajatweb/argent'

<Input
  label="Email"
  type="email"
  error={error}
  onValueChange={setEmail}
/>

Props

PropTypeDefaultWhat it does
label requiredstring
defaultValuestring
disabledboolean
errorstringError text. Also marks the field invalid.
hintstringHelp text under the field.
onValueChange(value: string) => void
placeholderstring
requiredboolean
size'sm' | 'md' | 'lg''md'
valuestring

Accessibility

  • The label, hint and error are tied to the field.
  • An error also marks the field invalid on the web.

Do

  • Say how to fix the error.

Don’t

  • Use the placeholder as a label.