LabelText
Import
import LabelText from '@govuk-react/label-text';
Usage
Styled text to use as a label for a form input.
This is not a label element by default as it is assumed it will be wrap with Label.
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:
Properties
Prop | Required | Default | Type | Description |
---|
children | true | `````` | node | Text for the label |