Button toggle

A button group is suitable for choosing from a list of 3 to 5 items when they fit in a single row without wrapping.

A regular button and a pressed button can each be individually disabled.

When all items are disabled or the pressed button is blocked, the entire group is styled as unavailable for interaction.

By default, the size of the button group depends on its content, but there is an additional option to stretch it to the available width. Items share the available space equally, and content inside each button is centered.

If text does not fit within a button, it is truncated with an ellipsis. A tooltip with the full name is available on hover or focus.

Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.