<Radio> Component

<Radio> is an interactive control in order to select single option.

Here the demo:

Preview
radioradioradioradiotoggle radio

Installing <Radio> Component

There are 2 ways to install <Radio> component into your react app project:

  • Install the Specific Package of <Radio> Component
  • Install the Whole Reusable-UI Component Pack, including the <Radio> Component

Variant Properties

The alternative appearances of the <Radio> layout without changing the <Radio>'s functionality.

checkStyle Property

Sets the alternative appearances of the <Radio>.

The possible values are:

  • undefined
  • 'regular'
  • 'switch'
  • 'button'
  • 'toggleButton'

Here the preview:

Preview
A <Radio> with regular styleA <Radio> with switch styleA <Radio> with button styleA <Radio> with toggleButton style

Show code

size Property

Defines the alternative size of the <Radio>.

The possible values are:

  • undefined
  • 'sm'
  • 'md'
  • 'lg'

Here the preview:

Preview
A <Radio> with sm sizeA <Radio> with md sizeA <Radio> with lg size

Show code

theme Property

Defines the contextual theme of the <Radio>.

The possible values are:

  • undefined
  • 'primary'
  • 'secondary'
  • 'success'
  • 'info'
  • 'warning'
  • 'danger'
  • 'light'
  • 'dark'

Here the preview:

Preview
A <Radio> with primary themeA <Radio> with secondary themeA <Radio> with success themeA <Radio> with info themeA <Radio> with warning themeA <Radio> with danger themeA <Radio> with light themeA <Radio> with dark theme

Show code

gradient Property

Activates a 3D mode of the <Radio>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview
A <Radio> with gradient modeA <Radio> with gradient modeA <Radio> with gradient modeA <Radio> with gradient modeA <Radio> with gradient modeA <Radio> with gradient modeA <Radio> with gradient modeA <Radio> with gradient mode

Show code

outlined Property

Activates an outlined mode (background-less, contrast foreground, and contrast border) of the <Radio>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview
A <Radio> with outlined modeA <Radio> with outlined modeA <Radio> with outlined modeA <Radio> with outlined modeA <Radio> with outlined modeA <Radio> with outlined modeA <Radio> with outlined modeA <Radio> with outlined mode

Show code

mild Property

Activates a mild mode (mild background, contrast foreground, and contrast border) of the <Radio>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview
A <Radio> with mild modeA <Radio> with mild modeA <Radio> with mild modeA <Radio> with mild modeA <Radio> with mild modeA <Radio> with mild modeA <Radio> with mild modeA <Radio> with mild mode

Show code

nude Property

Activates an nude mode (background-less, padding-less, and border-less) of the <Radio>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview
A <Radio> with nude-less modeA <Radio> with nude-less modeA <Radio> with nude-less modeA <Radio> with nude-less modeA <Radio> with nude-less modeA <Radio> with nude-less modeA <Radio> with nude-less modeA <Radio> with nude-less mode

Show code

State Properties

The conditions of the <Radio> behavior or functionality.

enabled Property

Defines the enabled/disabled state of the <Radio>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview
A <Radio> with disabled stateA <Radio> with disabled stateA <Radio> with disabled stateA <Radio> with disabled stateA <Radio> with disabled stateA <Radio> with disabled stateA <Radio> with disabled stateA <Radio> with disabled state

Show code

inheritEnabled Property

Influences the <Radio>'s disabled state by <ancestor enabled={false}>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview
A <Radio> with inherit disabled
A <Radio> with inherit disabled
A <Radio> with inherit disabled
A <Radio> with inherit disabled
A <Radio> with inherit disabled
A <Radio> with inherit disabled
A <Radio> with inherit disabled
A <Radio> with inherit disabled

Show code

readOnly Property

Defines the readOnly/mutable state of the <Radio>.

The possible values are:

  • undefined
  • true
  • false

inheritReadOnly Property

Influences the <Radio>'s readOnly by <ancestor readOnly={true}>.

The possible values are:

  • undefined
  • true
  • false

active Property

Defines the current active state of the <Radio>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview
A <Radio> with active stateA <Radio> with active stateA <Radio> with active stateA <Radio> with active stateA <Radio> with active stateA <Radio> with active stateA <Radio> with active stateA <Radio> with active state

Show code

inheritActive Property

Influences the <Radio>'s active state by <ancestor active={true}>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview
A <Radio> with inherit active
A <Radio> with inherit active
A <Radio> with inherit active
A <Radio> with inherit active
A <Radio> with inherit active
A <Radio> with inherit active
A <Radio> with inherit active
A <Radio> with inherit active

Show code

enableValidation Property

Activates the valid/invalid indicator of the <Radio>.

The possible values are:

  • undefined
  • true
  • false

isValid Property

Marks the validity status of the <Radio>.

The possible values are:

  • undefined
  • null
  • true
  • false

Here the preview:

Preview
A <Radio> marked as neutralA <Radio> marked as validA <Radio> marked as invalid

Show code

inheritValidation Property

Influences the <Radio>'s valid/invalid indicator by <ancestor isValid={true|false} enableValidation={true}>.

The possible values are:

  • undefined
  • true
  • false

Variables

There are several variables of <Radio> you can customize. Changing the variables affects all <Radio> instance and other components that depend on <Radio>.

Here the exposed variables:

  • Animations

The example of accessing, modifying, & adding variables:

Show code