# SegmentedControl

A single-choice control that shows all options at once, built on the Radix
ToggleGroup in single mode.

This is a function exported by `@mapcairn/map`, checked against version 0.2.0.

## Signature

```ts
import { SegmentedControl } from "@mapcairn/map";
 
function SegmentedControl(input: SegmentedControlProps): JSX.Element;
```

## Description

Radix renders the group as a `radiogroup` and each item as a `radio`, which
is the right semantics for a mutually exclusive choice. Focus moves between
items with the arrow keys (one tab stop for the whole group) and Space or
Enter chooses the focused item.

Unlike a raw toggle group, the selection can never be cleared: pressing the
active item again is ignored. The selected item is filled and shows a check
mark, so selection never relies on colour alone.

## Parameters

- `{ label, options, value, onValueChange, disabled, className, "data-testid": testId, }`
- `input` (`SegmentedControlProps`)

## Returns

`JSX.Element`

## See also

- [`SegmentedControlProps`](https://docs.mapcairn.com/api/map/SegmentedControlProps.md)

Source: [packages/map/src/ui/SegmentedControl/SegmentedControl.tsx:55](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/ui/SegmentedControl/SegmentedControl.tsx#L55)
