Diwa Design System

Segmented Control

A compact button group that lets users switch between a set of mutually exclusive views or modes.

diwa-segmented-control Properties

NameTypeDefaultDescription
valuestring''Currently selected segment value.
disabledbooleanfalseDisables all segments.
compactbooleanfalseEnables dense mode. Reduces segment padding and font size.
theme'dark' | 'light''dark'Per-component theme override.

diwa-segmented-control Events

NameDetail typeBubblesDescription
update{ value: string }NoEmitted when the selected segment changes.

diwa-segmented-control Slots

Default slot — accepts one or more diwa-segmented-control-item elements.

diwa-segmented-control-item Properties

NameTypeDefaultDescription
valuestring''The value emitted when this segment is selected.
selectedbooleanfalseWhether this segment is active. Managed by the parent.
disabledbooleanfalseDisables this segment. Also set by the parent when the group is disabled.
compactbooleanfalseDense-mode sizing. Also set by the parent.
theme'dark' | 'light''dark'Per-component theme override.

diwa-segmented-control-item Slots

Default slot — segment label text or icon.