Appearance
Getting started
This SDK is browser only. Do not create a client or call SDK methods on the server (Node.js, SSR, RSC). createSwappedConnectClient throws BROWSER_REQUIRED if it is initialized outside the browser. Create a sessionId on your backend, then use this package in the browser. If your site sends a Content-Security-Policy, allow the Swapped widget and API origins - see Browser requirements.
Guides are split into two tracks:
- Core - framework-agnostic
@swapped/connect-sdk - React - provider and hooks from
@swapped/connect-sdk/react
Wiring this up with an AI coding agent (Claude Code, Cursor, Codex, …)? See For AI agents for a condensed reference, or point it at /llms.txt for the whole site as plain Markdown.