structyl

Toggle Group

stable

A set of two-state buttons that can be single or multiple select.

Basic usage

Examples

Single selection (alignment)

Use type="single" for mutually exclusive choices like text alignment.

Alignment: left

Single and multiple groups

Use type="single" for mutually exclusive choices and type="multiple" for toolbars.

Features

  • Single or multiple selection.
  • Roving focus navigation.

Installation

bash
pnpm dlx structyl add toggle-group

API Reference

Toggle Group API reference

Full props, types, defaults, and all 2 parts.

View API
Toggle Group | structyl