Socket
Socket
Sign inDemoInstall

@govuk-react/checkbox

Package Overview
Dependencies
28
Maintainers
5
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @govuk-react/checkbox

Styled checkbox component, also displaying label.


Version published
Weekly downloads
3.1K
decreased by-14.72%
Maintainers
5
Created
Weekly downloads
 

Readme

Source

Checkbox

Import

  import Checkbox from '@govuk-react/checkbox';

Usage

Simple

import { Checkbox } from 'govuk-react'

<Checkbox>Text displayed next to checkbox</Checkbox>

With disabled state

<Checkbox disabled="disabled">Disabled checkbox option</Checkbox>

Checkbox preselected

<Checkbox defaultChecked>Farm or agricultural waste</Checkbox>

Checkbox preselected & disabled

<Checkbox disabled="disabled" defaultChecked>Farm or agricultural waste</Checkbox>

Checkbox with hint text

<Checkbox hint="including English, Scottish, Welsh and Northern Irish">British</Checkbox>

References:

  • https://github.com/alphagov/govuk-frontend/blob/main/src/govuk/components/checkboxes/_checkboxes.scss

Properties

PropRequiredDefaultTypeDescription
childrentrue``````nodeText content for checkbox
classNameundefinedstringCSS Classname for outermost container
hintundefinednode

FAQs

Last updated on 06 Sep 2021

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc