0.7.4 • Published 3 years ago

@slice-and-dice/govuk-react-radio v0.7.4

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

Radio

Import

  import Radio from '@govuk-react/radio';

Usage

Simple

<Radio name="group1">Radio button text example</Radio>

Radio stacked

 <div>
   <Radio name="group1">Waste from animal carcasses</Radio>
   <Radio name="group1">Waste from mines or quarries</Radio>
   <Radio name="group1">Farm or agricultural waste</Radio>
 </div>

Radio inline

 <div>
   <Radio name="group1" inline>
     Yes
   </Radio>
   <Radio name="group1" inline>
     No
   </Radio>
 </div>

Radio disabled

 <div>
   <Radio name="group1" disabled="disabled">
     Disabled checkbox option
   </Radio>
 </div>

Radio preselected

 <div>
   <Radio name="group1" checked>
     Farm or agricultural waste
   </Radio>
 </div>

Radio preselected & disabled

 <div>
   <Radio name="group1" disabled="disabled" checked>
     Farm or agricultural waste
   </Radio>
 </div>

Radio with hint text

<div>
  <Radio
   name="group1"
   hint="You'll have a user ID if you've registered for Self Assessment or filed a tax return
         online before."
  >
    Sign in with Government Gateway
  </Radio>
</div>

References:

Properties

PropRequiredDefaultTypeDescription
childrentrue | node
classNameundefinedstring
hintundefinednode
inlinefalsebool