Toggle Button Group
Live preview and documentation for the Toggle Button Group component.
Preview
componentPreview.loading
About
Groups several KasyToggleButtons into a single single-select or multi-select control, like a segmented control or a set of separate pills.
items: a list ofKasyToggleButtonItem(labeland/oricon,prefixIcon,suffixIcon,enabled).selected/onChanged: the set (Set<int>) of selected indices and the callback with the new set.selectionMode:single(exclusive selection, default) ormultiple.isAttached:true(default) joins the cells into a single rounded container with thin dividers;falseseparates each toggle into an independent pill.orientation:Axis.horizontal(default) orAxis.vertical.size:sm,md(default), orlg, passed down to eachKasyToggleButton.expand: stretches the cells to fill the main axis.
When isAttached is true, each cell uses the ghost variant (transparent, blends into the group's neutral background); when false, it uses filled as a standalone pill.
Last updated on 08/23/2026

