Locale Segment Group
@/components/kamod-ui/locale-segment-group
Current locale: de
Installation
Import LocaleSegmentGroup from `@/components/kamod-ui/locale-segment-group`.
pnpm add @kamod-ch/uiUsage
Control `value` from your app state (for example editor `getLocale` / `setLocale`). Clicking the active segment does nothing; only changes call `onValueChange`.
import { LocaleSegmentGroup } from "@/components/kamod-ui/locale-segment-group";<LocaleSegmentGroup />Basic DE / EN
Default options match a German / English app chrome switch. Wire `value` and `onValueChange` for a controlled component.
Custom options
Pass `options` to use different locale codes or labels. The active segment still cannot be deselected by clicking it again.
Current value: en
API Reference
Props, slots and variants for this component.
Locale Segment Group
Locale Segment Group component props and accepted values.
| Prop | Type | Default |
|---|---|---|
| value | string | required |
| onValueChange | (next: string) => void | required |
| options | { value: string; label: string }[] | DE / EN |
| class | string | undefined |
| aria-label | string | "Language" |
Accessibility Notes
The root uses role="group" with a clear `aria-label`. Each segment is a button with `aria-pressed` reflecting selection.