Socket
Book a DemoInstallSign in
Socket

@govuk-react/details

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govuk-react/details

Renders a styled details element along with summary from prop and children rendered as contents.

npmnpm
Version
0.9.0
Version published
Weekly downloads
2.1K
-69.81%
Maintainers
5
Weekly downloads
 
Created
Source

Details

Import

  import Details from '@govuk-react/details';

IE Compatibility

Please note that this component uses a

component, which requires a polyfill to work correctly on Internet Explorer.

Usage

Simple

import { Details } from 'govuk-react'

<Details summary="Help with nationality">
  I am a paragraph of hidden details, to be revealed when summary is clicked
</Details>

References

  • https://design-system.service.gov.uk/components/details/
  • https://github.com/alphagov/govuk-frontend/blob/main/src/govuk/components/details/_details.scss

Properties

PropRequiredDefaultTypeDescription
childrenundefinednodeThe content that will be displayed when details are revealed
openfalseboolFlag to indicate whether to show component open by default
summarytrue``````nodeText for the details summary link e.g. Help with nationality

FAQs

Package last updated on 30 May 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