BinaryButton
A selectable Button tile that can display an icon and labels or custom tile content.
React
BinaryButton composes RadioButton or
CheckButton depending on the provided
inputType with support for larger tile content with an icon, title and
subtitle.
Input type
BinaryButton renders input elements and supports both radio and
checkbox type inputs. The inputType prop on either the buttons or the group
determine which input type is rendered.
The following components are also exported for convenience and clarity when working with different input types:
- BinaryButtonRadioGroup
- BinaryButtonRadio
- BinaryButtonCheckboxGroup
- BinaryButtonCheckbox
The size and inputType props are propagated from group to the child buttons.
Radio
Checkbox
Subtitle type
An alternative version of the subtitle is available by passing subtitleType.
Size
BinaryButton is available in small, medium and large sizes. The
small size adjusts the layout of the tile slightly.
Color mode
BinaryButton supports dark mode inherited from the color mode context.
Custom content
To render custom tile content, simply pass children to the BinaryButton.
Use buttonStyles to customize padding, etc. on the parent button and
contentStyles to customize the layout of the custom content.