> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kontext.so/llms.txt
> Use this file to discover all available pages before exploring further.

# React SDK

> 使用 React SDK 在你的 React 应用中接入 Kontext 广告。

<Card title="React Demo 项目" icon="github" href="https://github.com/kontextso/sdk-react-demo">
  看看用我们轻量的 SDK 接入高性能广告有多简单。
</Card>

## 环境要求

* **React**：18.0.0 或更高版本

<Note>
  你需要一个 [发布方账号](/publishers#getting-started-is-easy) 来获取 `publisherToken` 与 placement code。
</Note>

<CardGroup cols={2}>
  <Card title="安装" icon="download" href="/sdk/react/installation">
    安装 npm 包并准备你的应用。
  </Card>

  <Card title="展示第一个广告" icon="rocket" href="/sdk/react/first-ad">
    用 `<AdsProvider>` 包裹应用、喂入消息、挂载 `<InlineAd>`——五分钟完成接入。
  </Card>

  <Card title="API 参考" icon="book" href="/sdk/react/api">
    Props、hook、组件与事件。
  </Card>

  <Card title="实践指南" icon="signs-post" href="/sdk/react/guides">
    no-fill、切换 character、会话恢复等常见模式。
  </Card>

  <Card title="示例应用" icon="github" href="/sdk/react/example">
    使用你自己的 publisher token 端到端运行 Vite + React 示例。
  </Card>
</CardGroup>
