A guide to quickly integrate the Para Modal into your Vite-powered React application.
This guide will walk you through integrating Para SDK into your Vite-powered React application, providing seamless user authentication and wallet management.
Before starting, you’ll need a Para API key which you can obtain from the Para Developer Portal. You can learn to create your account and get your API key from the Developer Portal.
Create a providers component and wrap your application with it:
The import "@getpara/react-sdk/styles.css" is required for the Para modal to display correctly. Without this import, the modal will not be visible.
Copy
Ask AI
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import { ParaProvider } from "@getpara/react-sdk";import "@getpara/react-sdk/styles.css";const queryClient = new QueryClient();export function Providers({ children }) { return ( <QueryClientProvider client={queryClient}> <ParaProvider paraClientConfig={{ apiKey: import.meta.env.VITE_PARA_API_KEY || "", }} config={{ appName: "YOUR_APP_NAME" // Replace with your app name }} > {children} </ParaProvider> </QueryClientProvider> );}
If you’re using a legacy API key (one without an environment prefix) you must provide a value to the paraClientConfig.environment. You can retrieve your updated API key from the Para Developer Portal at https://developer.getpara.com/
You can learn more about the ParaProvider and its definition in the .
The ParaProvider utilizes libraries like Wagmi, Graz, and Solana Wallet Adapter, to power wallet connections. Meaning you can use any of the hooks provided by these libraries when within the ParaProvider context. You can learn more about using external wallets in the .