A user-friendly guide to integrate the React-based Para Modal into your SvelteKit application.
If you haven’t already you can create a new SvelteKit project by following the official SvelteKit docs.
Although mixing React and Svelte is unusual, we can do so via svelte-preprocess-react. If you prefer to build your own custom UI, you can also use @getpara/web-sdk
directly.Reach out to use for help with custom UI integration.
To use Para, you need an API key. This key authenticates your requests to Para services and is essential for integration.
Don’t have an API key yet? Request access to the Developer Portal to create API keys, manage billing, teams, and more.
Install the Para React SDK, plus React dependencies:
In your svelte.config.js, import and apply svelte-preprocess-react
:
SvelteKit uses Vite under the hood. Install and configure polyfills for Node modules:
Then enable it in vite.config.ts
:
If you prefer SSR, ensure you dynamically handle the React-based modal on the client. If you want pure client-side
usage, set export const ssr = false;
in your page’s .ts
or .js
files for SvelteKit to skip SSR.
Now that you’ve installed the necessary dependencies, let’s set up the Para SDK in your SvelteKit application. This involves creating a client instance and integrating the Para Modal.
As with other frameworks, you’ll need a dedicated file for your client instance (e.g., client/para.ts
):
Para offers two hosted environments: Environment.BETA
(alias Environment.DEVELOPMENT
) for testing, and
Environment.PROD
(alias Environment.PRODUCTION
) for live use. Select the environment that matches your current
development phase.
Let’s say you have a +page.svelte
in src/routes/
. You would use the Para Modal with the preprocessed React
component:
With SSR disabled, the page will be served client-side only, ensuring the React-based modal can load without conflicts.
Beta Testing Credentials In the BETA
Environment, you can use any email ending in @test.getpara.com
(like
dev@test.getpara.com) or US phone numbers (+1) in the format (area code)-555-xxxx
(like (425)-555-1234). Any OTP
code will work for verification with these test credentials. These credentials are for beta testing only. You can
delete test users anytime in the beta developer console to free up user slots.
Just like in React, you can provide any additional props to the <ParaModal>
component. For example, customizing
theming:
For a full list of available ParaModalProps
, refer to the customization guide:
For an example of using Para SDK in a Svelte application, check out our Examples Hub repository:
If you encounter issues during the integration or usage of the Para Modal in a Svelte-based app, here are some common problems and their solutions:
After integrating Para, you can explore other features and integrations to enhance your Para experience.