Toggle Group
A toggle button group provides an intuitive way for users to switch between multiple options, supporting both single and multi-selection modes.
Basic
A toggle button lets folks flip a choice on or off, like switching between two vibes or modes.
Installation
If you hit any issues, make sure you check out the installation guide here.
Composed Components
When you plug this component from the CLI, it autoloads all the composed components. No need to toss 'em in one at a time.
The Toggle Group's decked out with several components to make it bangin'.
Manual Installation
Sometimes, using the CLI is the way to go, so make sure you install the necessary dependencies for the components you want to use.
Anatomy
Import the components and use them as shown below, adapting the structure to fit each component.
Orientation
By default, the toggle button group is horizontally oriented. You can change it to a vertical orientation by using the orientation
prop.
Selection Mode
You can change the selection mode of the toggle button group by using the selectionMode
prop.
Appearance
You can change the appearance of the toggle button group by using the appearance
prop.
Controlled
You can control the state of the toggle button group by using the selectedKeys
prop.
Disabled
You can disable a toggle button group by using the disabled
prop.
If you want, you can also disable individual toggle buttons by using the isDisabled
prop on the Toggle
component.