@govuk-react/input

Styled input component with optional type prop, defaulting to 'text'.

Stats

StarsIssuesVersionUpdatedCreatedSize
@govuk-react/input
0.9.119 days ago4 years agoMinified + gzip package size for @govuk-react/input in KB

Readme

Input

Import

  import Input from '@govuk-react/input';

Usage

Simple

import { Label, LabelText, HintText, ErrorText, Input } from 'govuk-react'

<Label>
  <LabelText>Example label</LabelText>
  <HintText>Example hint</HintText>
  <ErrorText>Example error</ErrorText>
  <Input value={value} onClick={onClick} />
</Label>

References:

TODO:

  • Remove errorColor and provide examples on how to extend the component

Properties

Prop Required Default Type Description
error false bool
errorColor undefined string
type 'text' string HTML <Input /> type

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.