# gt-next: General Translation Next.js SDK: RegionSelector URL: https://generaltranslation.com/zh/docs/next/api/components/region-selector.mdx --- title: RegionSelector description: RegionSelector 组件的 API 参考文档 --- {/* 自动生成:请勿直接编辑。请改为编辑 content/docs-templates/ 中的模板。 */} ## 概述 `` 组件是一个下拉列表,用于让用户选择所在区域。 它是一个客户端组件,会从 [`` 上下文](/docs/next/api/components/gtprovider) 中读取区域数据。 ## 参考 ### 返回值 一个允许用户选择其区域的 `` 元素。 ## 示例 ### 基本用法 ```jsx title="MyComponent.jsx" copy import { RegionSelector } from 'gt-next'; export default function MyComponent() { return ; } ``` ### 结合自定义映射和占位符 ```jsx title="CustomRegion.jsx" copy import { RegionSelector } from 'gt-next'; export default function CustomRegion() { return ( ); } ``` *** ## 注意 * `` 组件仅可在客户端使用。 * 如需完全自定义区域选择器 UI,请使用 [`useRegionSelector`](/docs/next/api/helpers/use-region-selector) Hook。 ## 下一步 * 请参阅 [`useRegionSelector`](/docs/next/api/helpers/use-region-selector),了解如何构建自定义区域选择器。 * 请参阅 [`useRegion`](/docs/next/api/helpers/use-region),了解如何读取当前区域。 * 请参阅 [``](/docs/next/api/components/locale-selector),了解对应的区域设置选择器。