Checker
A variation of the Radio element.
Last updated
Was this helpful?
A variation of the Radio element.
Last updated
Was this helpful?
The Checker component can be used in place of the and it is a different variation of the .
To use the Checker component, it has to be imported just like every other component as shown in the example below.
When Checker
is imported, it comes in two variations, dotted styled
and flat styled
. The Checker
component also comes in the active
(default state) and disabled
state.
As seen above the Checker
component accepts properties such as the disabled
, style
, label
, buttons
, name
, canClear
and onChange
.
The disabled
props accepts a value of true or false but has a default of true.
The style
props has a fixed value of either Dot
or Flat
. This fixed style comes as the properties of an object (Checker.Styles) that is embedded with the Checker component.
The label
props is an optional props and if is omitted, the label indicator disappears from the component. The buttons
props accepts an array of strings which is used to create the options for the buttons and the name
props accepts a string used to interact with the form.
The canClear
accepts a boolean. If set to true, the user can reset their selection. The onChange
props accepts a callback function.
The Checker components can also be used with as shown below.