# General Translation React SDKs (gt-react, gt-next): RegionSelector URL: https://generaltranslation.com/en-GB/docs/react/reference/components/region-selector.mdx --- title: RegionSelector description: Render a dropdown for switching the active region with General Translation gt-react. API reference for RegionSelector. --- The `` component renders a dropdown that lets users switch the active region. It is a client-side component that reads region data from the [``](/docs/react/reference/components/gt-provider) context. *Available in `gt-react` and `gt-next`. Examples import from `gt-react`; import from your framework’s package instead.* *Note: not exported by `gt-tanstack-start` or `gt-react-native`.* ## Overview [#overview] Render `` inside your provider. With no props, it infers regions from the supported locales. ```tsx import { RegionSelector } from 'gt-react'; export default function MyComponent() { return ; } ``` *Note: `` is client-side only, and renders a `` element. ## Props [#props] | Prop | Description | Type | Optional | Default | | ---------------------------------------------- | --------------------------------------------------- | ----------- | -------- | -------- | | [`regions`](#regions) | Subset of ISO 3166 region codes to show. | `string[]` | Yes | Inferred | | [`placeholder`](#placeholder) | Placeholder content for the first option. | `ReactNode` | Yes | — | | [`customMapping`](#custom-mapping) | Custom display names, emojis or locales per region. | `object` | Yes | — | | [`prioritizeCurrentLocaleRegion`](#prioritize) | Put the current locale's region first. | `boolean` | Yes | `true` | | [`sortRegionsAlphabetically`](#sort) | Sort regions alphabetically by display name. | `boolean` | Yes | `true` | | [`asLocaleSelector`](#as-locale-selector) | Also update the locale when a region is selected. | `boolean` | Yes | `false` | ### `regions` [#regions] **Type** `string[]` · **Optional** · **Default** Inferred An array of ISO 3166 region codes to display, such as `['US', 'CA', 'GB']`. When omitted, regions are inferred from the supported locales. ### `placeholder` [#placeholder] **Type** `ReactNode` · **Optional** Placeholder content shown as the first option when no region is selected. ### `customMapping` [#custom-mapping] **Type** `object` · **Optional** A mapping of region codes to custom display data. Each value can be a string (display name) or an object with `name`, `emoji`, and/or `locale` properties. ### `prioritizeCurrentLocaleRegion` [#prioritize] **Type** `boolean` · **Optional** · **Default** `true` When `true`, the region matching the current locale is prioritised at the top of the list. ### `sortRegionsAlphabetically` [#sort] **Type** `boolean` · **Optional** · **Default** `true` When `true`, regions are sorted alphabetically by display name. ### `asLocaleSelector` [#as-locale-selector] **Type** `boolean` · **Optional** · **Default** `false` When `true`, selecting a region also updates the locale to the region's associated locale. ## Examples [#examples] ```tsx title="MyComponent.tsx" import { RegionSelector } from 'gt-react'; export default function MyComponent() { return ; } ``` ```tsx title="CustomRegion.tsx" import { RegionSelector } from 'gt-react'; export default function CustomRegion() { return ( ); } ``` ## Notes [#notes] * `` is client-side only. * To read the active region, use [`useRegion`](/docs/react/reference/hooks/use-region); to build a custom selector, use [`useRegionSelector`](/docs/react/reference/hooks/use-region-selector). * For the locale equivalent, see [``](/docs/react/reference/components/locale-selector).