SDK Demos
Reference applications that show how to integrate the LoginRadius v3 JavaScript SDKs into real-world frontends. Each demo is self-contained and installs the SDK directly from npm.
All demo source code is available in the loginradius-demos repository.
Available Demos
| Demo | Demo Reference Document | GitHub Reference Link |
|---|---|---|
| JS SDK (npm) | JS SDK (npm) Demos Guide | SDK and GitHub reference |
| JS SDK (CDN) | JS SDK (CDN) Demo Guide | SDK and GitHub reference |
| React SDK | React SDK Demos Guide | SDK and GitHub reference |
Prerequisites
- Node.js 20.19+ or 22.12+
- pnpm 10+ (recommended), or use
npm/yarnper individual demo - A LoginRadius tenant with your API Key from the Admin Console
Quick Start
git clone https://github.com/LoginRadius/loginradius-demos.git
cd loginradius-demos
pnpm install
pnpm --filter @loginradius/demo-react-playground dev
Or treat any demo as a standalone project:
cd loginradius-js/vue
npm install
npm run dev
Configuration
Every demo needs your LoginRadius API Key and SOTT. The variable name depends on the bundler:
| Framework | Variable prefix | File |
|---|---|---|
| Vite | VITE_LOGINRADIUS_* | .env.local |
| Next.js | NEXT_PUBLIC_LOGINRADIUS_* | .env.local |
| Nuxt | NUXT_PUBLIC_LOGINRADIUS_* | .env |
| Angular | n/a | src/environments/environment.ts |
| Vanilla HTML | n/a | Edit index.html inline |
VITE_LOGINRADIUS_API_KEY=your-api-key
VITE_LOGINRADIUS_SOTT=your-sott
caution
Never commit credentials. .env* files are gitignored. Vanilla HTML and Angular demos ship with placeholder values that you must replace locally.
Looking for Legacy Demos?
V2 SDK demos live under the Legacy sub-section.