radix-ui / themes

Radix Themes is an open-source component library optimized for fast development, easy maintenance, and accessibility. Maintained by @workos.
https://radix-ui.com/themes
MIT License
5.23k stars 187 forks source link

[SegmentedControl] Disabled items not supported #489

Open lucarestagno opened 4 months ago

lucarestagno commented 4 months ago

Hi,

it looks like the SegmentedControl.Item component doesn't support the disabled state out-of-the-box. I can trick it by using the aria-disabled attribute, and changing the look and feel via CSS, but the Item is still clickable.

If I use pointer-events: none; it works, but I cannot customize the cursor.

Since the rendered component is a button, I wonder why it has been decided to remove disabled.

Do you know any good workaround?

Thanks, Luca

vladmoroz commented 4 months ago

Disabled items weren't implemented because of time constraints We'll add this in one of the future versions