# ToggleGroup (@limerdev/zest) A set of joined toggles: `` (`type="single"` or `"multiple"`, `bind:value`, `variant`, `size`) holds `ToggleGroup.Item`s (`value`). Arrow keys move between items; Space or Enter presses one. Name the group with `aria-label`. - Category: Actions - Import: `import { ToggleGroup } from '@limerdev/zest'` - Bits UI: `ToggleGroup`, https://bits-ui.com/docs/components/toggle-group - Exports: `ToggleGroup.Root`, `ToggleGroup.Item` - Use for: Picking one or several of a few view options shown at once: alignment, a chart's period (day, week, month), which columns to show. - Don't: A choice in a form: use `RadioGroup` or `Checkbox`es. Switching views of a page's content: use `Tabs`. ```svelte Day Week Month ``` Props of `ToggleGroup.Root`: - `disabled` (`boolean`, default `false`): Whether the toggle group is disabled or not. - `loop` (`boolean`, default `true`): Whether to loop through the items when reaching the end when using the keyboard. - `onValueChange` (`OnChangeFn | OnChangeFn`) - `orientation` (`"horizontal" | "vertical"`, default `'horizontal'`): The orientation of the toggle group. Used to handle keyboard navigation between items. - `rovingFocus` (`boolean`): Whether to enable roving focus or not. When enabled, users navigate between the items using the arrow keys. When disabled, users navigate between the items using the tab key. - `size` (`"default" | "sm" | "lg"`, default `'default'`): The height and padding, from the theme's field size. - `type` (`"multiple" | "single"`, required) - `value` (`string | string[]`, bindable) - `variant` (`"outline" | "default"`, default `'default'`): `default` is plain until pressed; `outline` has a border. Props of `ToggleGroup.Item`: - `disabled` (`null | false | true`, default `false`): Whether the toggle item is disabled or not. - `value` (`string`, required): The value of the toggle item. Example: Basic type="single" picks one period; type="multiple" shows several columns. ```svelte
Day Week Month Hours Cost Margin

Per {period}, showing {columns.join(', ') || 'nothing'}

```