This documentation is under construction. Pages can be missing or change at any time. Follow it on GitHub.

Skip to content

Toggle Group

Provides a shared state to a series of toggle buttons.

Examples#

Multiple#

Add the multiple prop to allow pressing more than one toggle at a time.

API reference#

Import the components of the family:

use Phem\Ui\ToggleGroup;
use function Phem\Ui\Toggle;

ToggleGroup#

A group of toggle buttons with one state: Base UI ToggleGroup, on the phem-toggle-group controller. defaultValue lists the values of the pressed toggles. Give it an aria-label.

PropTypeDefault
defaultValuearray[]
multipleboolfalse
orientation'horizontal' | 'vertical'Orientation::Horizontal
loopFocusbooltrue
disabledboolfalse
children?Htmlnull
...attrsarray[]

The source of the examples: examples/ui/ToggleGroup.phem.

Phem
Esc
↑↓ to navigate↵ to openEsc to close