mui / mui/base-ui

[toggle] Single selection mode with role="radio"

Open
#3,525 8 comments 1 reaction 0 assignees View on GitHub
component: toggle component: toggle group support: question
Dominant language
TypeScript
Stars
10.9k
Forks
543
Avg merge
1d 20h
Merged PRs (30d)
101

Description

Hello team!

Congrats on your first stable release!

My question is around the Toggle/ToggleGroup components in their single selection mode.

As per [this example in shadcn](https://ui.shadcn.com/docs/components/toggle-group#single), Radix `ToggleGroup` sets `role="radio"` to `ToggleGroupItem`'s in single selection mode and I was kind of expecting the same from Base UI `ToggleGroup` when `multiple={false}`.

I see the same behavior in React Spectrum [ToggleGroup](https://react-spectrum.adobe.com/react-aria/ToggleButtonGroup.html#single-selection)

Is there a reason we are not doing the same on the Base UI component?

TIA!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.