# Segmented control (UI SDK): Right to left

> The items run from the right, and the indicator follows them.

Canonical: https://hextaui.com/docs/ui-sdk-segmented-control/examples/rtl

Component docs: https://hextaui.com/docs/ui-sdk-segmented-control

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/ui-sdk-segmented-control-rtl.json
```

This adds `components/examples/ui-sdk-segmented-control/rtl.tsx` with the Segmented control component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/ui-sdk-segmented-control/rtl.tsx"
import {
  SegmentedControl,
  SegmentedControlItem,
} from "@/components/ui/ui-sdk-segmented-control"

function UiSdkSegmentedControlRtl() {
  return (
    <div dir="rtl" lang="ar">
      <SegmentedControl aria-label="العرض" defaultValue="list">
        <SegmentedControlItem value="list">قائمة</SegmentedControlItem>
        <SegmentedControlItem value="grid">شبكة</SegmentedControlItem>
        <SegmentedControlItem value="board">لوحة</SegmentedControlItem>
      </SegmentedControl>
    </div>
  )
}

export { UiSdkSegmentedControlRtl }
```

## Props in this example

### SegmentedControl

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValue` | `T \| null` | – |  |

### SegmentedControlItem

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` | `string` | – |  |

## More Segmented control examples

- [Sizes](https://hextaui.com/docs/ui-sdk-segmented-control/examples/sizes)
- [Icons](https://hextaui.com/docs/ui-sdk-segmented-control/examples/icons)
- [Full width](https://hextaui.com/docs/ui-sdk-segmented-control/examples/full-width)
- [Vertical](https://hextaui.com/docs/ui-sdk-segmented-control/examples/vertical)
- [Disabled](https://hextaui.com/docs/ui-sdk-segmented-control/examples/disabled)
- [Controlled](https://hextaui.com/docs/ui-sdk-segmented-control/examples/controlled)
- [Form](https://hextaui.com/docs/ui-sdk-segmented-control/examples/form)
- [Read-only](https://hextaui.com/docs/ui-sdk-segmented-control/examples/read-only)
