Socket
Book a DemoInstallSign in
Socket

@slice-and-dice/govuk-react-fieldset

Package Overview
Dependencies
Maintainers
8
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slice-and-dice/govuk-react-fieldset

govuk-react Fieldset component.

latest
npmnpm
Version
0.7.1
Version published
Maintainers
8
Created
Source

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

  • https://design-system.service.gov.uk/components/fieldset/
  • https://github.com/alphagov/govuk-frontend/tree/master/src/components/fieldset
  • https://design-system.service.gov.uk/get-started/labels-legends-headings/

Properties

PropRequiredDefaultTypeDescription
childrentrue``````node

FAQs

Package last updated on 10 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts