Components

Button Toggle Switch

The Button Toggle Switch component is used for rendering out a group of buttons that have the ability to generate values from their toggled state. This functionality is similar to a radio button & a custom checkbox wrapped into one component. It should be used for custom selection and choices.

Import

import { ButtonToggleSwitch } from '@outfit/outkit';

Basic Usage

Variants

Multiselect Usage

Dynamic Icon

Tooltip Props

Best Practice

The Button Toggle Switch can be used in a variety of ways. The button is aimed to be more flexible than simple radios and toggle buttons.

Props

PropertyTypeRequiredDefaultDescription
sizestring[] | stringNo'md'The size of the buttons.
buttonsnode[] | nodeYesChildren containing buttons to render
variantColorstring | nodeNo'gray'Color of the entire button group
defaultValuestring[] | stringNoThe initial value of the default that will be selected. If left null, the default will be null
onChangefuncYesA callback function for getting the value based on the changing values.
multiselectboolNoA true of false boolean prop that toggles the ability to select multiple & none.