About the React SDK
The React SDK allows you to integrate completely designed pages on your website.
Overview
With the React SDK, you can integrate React components that pull content and display it on your website. You can then customize it with some of our available props and with CSS overwrite on your side to make it feel natively part of your website.
Currently, we don't support Swapcard authentication in the SDK.
All content you want to display while using the SDK should be available for guests in the studio.
A good way to verify this is to open your event in a private navigation window (https://YOUR_APP_DOMAIN/event/YOUR_EVENT_SLUG).
If it opens public information of your event, it will be available in the SDK.
We have also an example repository with the SDK implemented through a NextJS application:
- Source code: https://github.com/Swapcard-Corporation/react-sdk-nextjs-example
- Website: https://react-sdk-nextjs-example.vercel.app/
Requirements
You must have React and React-DOM installed. We also use internally styled-components to style our components, so you need to install it as well. You can also use it on your own website by doing so. To do so:
Using yarn
yarn add react react-dom styled-components
Using npm
npm install react react-dom styled-components
Installation
Using yarn
yarn add @swapcard/react-sdk
Using npm
npm install @swapcard/react-sdk
Be sure that you're installing the 2.^ version. This documentation is reflecting the latest version as our 1.^ is obsolete now.