Have ideas to improve npm?Join in the discussion! »

    @govuk-react/fieldset

    0.9.0 • Public • Published

    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

    import { Fieldset } from 'govuk-react'
    
    <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

    Prop Required Default Type Description
    children true `````` node

    Keywords

    none

    Install

    npm i @govuk-react/fieldset

    DownloadsWeekly Downloads

    523

    Version

    0.9.0

    License

    MIT

    Unpacked Size

    52.2 kB

    Total Files

    29

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar