Skip to content
Mizen UI
Docs

IntroductionInstallationCLIStylingFoundationsThemingCompositionIntegrationsAccessibilityFor agents

useCopyToClipboard

AccordionAspect RatioCardCollapsibleFrameGridGroupInlineScroll AreaSectionSeparatorSpacerStack

BlockquoteCitationCodeHeadingKbdLabelLinkTextVisually Hidden

ButtonButton GroupToggleToggle groupToolbar

CalendarCheckboxCheckbox groupComboboxDate pickerDate range pickerDate-Time InputFieldFieldsetFile UploadFormInputInput groupNumber fieldOTP FieldRadio groupSelectSliderSwitchTextareaTime Input

BreadcrumbMenubarNavigation MenuPaginationSegmented ControlStepperTabs

Alert dialogCommandContext MenuDialogDrawerMenuPopoverPreview CardSheetTooltip

AlertBadgeEmptyError StateMeterProgressSkeletonSpinnerStatus dotToast

Activity FeedAvatarAvatar GroupData TableListMetricOverflow ListProperty ListTableTokenTree

Area ChartBar ListCalendar HeatmapCategory ComparisonChart FrameChart LegendChart TooltipDistributionFunnelHeatmapMetric TrendPart-to-WholeProgress RingsRadar ChartRadial BarsSankey ChartScatter ChartScore GaugeTime Series

Diagram

AttachmentCarouselCode BlockLightboxMarkdownThumbnailTimestamp

Agent ThinkingApproval CardComposerConversationInline CitationMessageMessage ScrollerQuestion CardSourcesStreaming TextSuggestionTask ListTerminalTool Call

On this page

  • Preview
  • Usage
  • Anatomy
  • Examples
  • Paragraph alignment
  • Text formatting
  • Canvas layout
  • Icon sizes and separators
  • Disabled groups and items
  • With tooltips
  • Recommendations
  • Usage boundaries
  • API reference

Actions

Toggle group

Combines related toggles into one control surface.

idle

Usage

import { ToggleGroup, ToggleGroupItem } from "@mizen-labs/ui";

Anatomy

The parts and how they nest, taken from the preview above.

<ToggleGroup>
	<ToggleGroupItem />
</ToggleGroup>
<ToggleGroup>
	<ToggleGroupItem />
</ToggleGroup>

Examples

Paragraph alignment

Choose one alignment for the paragraph.

Text formatting

Combine bold, italic, and underline.

Canvas layout

Use a vertical group when the tools sit beside a canvas.

Icon sizes and separators

Outlined icon toggles share a joined border and inherit their group size.

Disabled groups and items

Disable a whole group or skip an unavailable item during keyboard navigation.

With tooltips

Name icon controls and provide the same label on hover and focus.

Recommendations

GuidancePractice
Do

Group related formatting or selection options. Name icon-only toggles and make selected states visible.

Usage boundaries

GuidanceBoundary
Scope

Use Segmented Control for a single choice. Use Toolbar when the group also contains unrelated commands.

API reference

Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.

PropTypeDefaultDescription
ToggleGroupToggleGroupProps<Value>—Groups related toggles with shared size and appearance.
valueValue[]—Controls selected values; an empty array clears the group.
defaultValueValue[]—Sets the initial selected values.
orientation"horizontal" | "vertical""horizontal"Sets the layout and keyboard direction.
sizeToggleSize"default"Sets the shared size for child toggles.
variantToggleVariant"default"Sets the shared default or outline treatment.
ToggleGroupItemToggleGroupItemProps<Value>—Inherits size and variant from its group. Toggle remains a compatible item alias.
ToggleGroupSeparatorToggleGroupSeparatorPropsorientation="vertical"A visual divider in joined outline groups. Use horizontal orientation for a vertical group.
multiplebooleanfalseAllows several values to be selected. Both modes allow an empty array.
disabledbooleanfalseDisables every item. Individual items can also be disabled.
loopFocusbooleantrueWraps arrow-key focus at either end of the group.
onValueChange(values, eventDetails) => void—Receives the next selection array. Cancel the event details to veto the change.
PreviousToggleNextToolbar

A calmer workspace

Keep projects, conversations, and decisions together. Give everyday work a little more room.

The best tools make the next step clear.

Choose a direction for the workspace panels.