0.7.1 • Published 3 years ago

@slice-and-dice/govuk-react-fieldset v0.7.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Fieldset

Import

  import Fieldset from '@govuk-react/fieldset';

Usage

Use the fieldset component when you need to show a relationship between multiple form inputs. For example, you may need to group a set of text inputs into a single fieldset when asking for an address.

Simple

<Fieldset>
  <Fieldset.Legend>Example</Fieldset.Legend>
</Fieldset>

The Fieldset.Legend sub-component supports a size prop compatible with Heading and a isPageHeading prop for use when you wish your legend to be used as a page heading

Custom legend

<Fieldset>
  <Fieldset.Legend size="XL" isPageHeading>Legend as page heading</Fieldset.Legend>
</Fieldset>

References

Properties

PropRequiredDefaultTypeDescription
childrentrue | node