Add Blend to your existing project
Blend works with any React project:
- ✅ Vite
- ✅ Next.js
- ✅ Create React App
- ✅ Remix
- ✅ ReScript React (with component bindings)
- ✅ Any React framework
# In your existing project folder
npm install @juspay/blend-design-system blend-studio
# OR with pnpm
pnpm add @juspay/blend-design-system blend-studio
# OR with yarn
yarn add @juspay/blend-design-system blend-studioAdd to your app's entry file:
For Vite/CRA: src/main.tsx or src/index.tsx
import '@juspay/blend-design-system/style.css'For Next.js: pages/_app.tsx
import '@juspay/blend-design-system/style.css'You do not need to create this file manually in normal setup.
Run:
npx blend-studio initThis automatically creates blend.config.json and the src/blend folder.
{
"$schema": "https://blend-studio-staging-2oyuucbkoa-uc.a.run.app/studio/schemas/blend-config.json",
"brand": "blend/default",
"theme": "light",
"output": "src/blend",
"components": [],
"studio": {
"apiUrl": "https://blend-backend-staging-2oyuucbkoa-uc.a.run.app",
"autoSync": false
},
"generate": {
"typescript": true,
"cssVariables": false,
"reactNative": false
}
}# 1) Create blend config + generated files
npx blend-studio init
# 2) Apply default Blend brand
npx blend-studio brand --preset blend{
"scripts": {
"blend:init": "blend-studio init",
"blend:brand": "blend-studio brand --preset blend",
"blend:login": "blend-studio login",
"blend:pull": "blend-studio pull",
"blend:push": "blend-studio push"
}
}Then run:
npm run blend:init
npm run blend:brandVite/CRA: src/main.tsx
import React from 'react'
import ReactDOM from 'react-dom/client'
import { BlendProvider } from './blend/provider'
import App from './App'
import '@juspay/blend-design-system/style.css'
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<BlendProvider theme="light">
<App />
</BlendProvider>
</React.StrictMode>
)Next.js: pages/_app.tsx
import { BlendProvider } from '../blend/provider'
import '@juspay/blend-design-system/style.css'
export default function MyApp({ Component, pageProps }) {
return (
<BlendProvider theme="light">
<Component {...pageProps} />
</BlendProvider>
)
}import {
ButtonV2,
ButtonV2Type,
TextInputV2,
} from '@juspay/blend-design-system'
function MyPage() {
return (
<div>
<TextInputV2 label="Name" placeholder="Enter name" />
<ButtonV2 buttonType={ButtonV2Type.PRIMARY} text="Submit" />
</div>
)
}If your app is built with ReScript React, Blend is supported.
- Install and initialize Blend the same way as JS/TS projects.
- Import Blend CSS in your app entry.
- Create ReScript externals/bindings for the Blend components you use.
This keeps the CLI + Studio workflow identical, with only a thin binding layer in your ReScript app.
npx blend-studio login
# OR
npm run blend:loginnpx blend-studio pull
# OR
npm run blend:pullYour app automatically gets new colors/fonts!
npx blend-studio push
# OR
npm run blend:pushUse this flow to avoid confusion:
- Run
npx blend-studio initandnpx blend-studio brand --preset blend - Verify app runs with
BlendProviderand at least one Blend component - Commit generated files (
blend.config.jsonandsrc/blend/*) - Push branch and open PR
- After PR is merged, run
blend-studio loginonce on your machine - Day-to-day:
- Designer changed tokens? run
blend-studio pull - You changed tokens locally? run
blend-studio push
- Designer changed tokens? run
Tip: Keep token sync (pull/push) in small, focused commits so review is easy.
npm i @juspay/blend-design-system blend-studio// In your app entry file
import '@juspay/blend-design-system/style.css'
import { BlendProvider } from './blend/provider'import { ButtonV2, TextInputV2, CardV2 } from '@juspay/blend-design-system'| Command | Action |
|---|---|
npx blend-studio init |
Create config + blend folder |
npx blend-studio brand |
Apply default brand |
npx blend-studio login |
Login to Studio |
npx blend-studio pull |
Get latest designs |
npx blend-studio push |
Send your designs |
| Environment | URL | Use When |
|---|---|---|
| Staging | https://blend-backend-staging-2oyuucbkoa-uc.a.run.app |
Testing |
| Production | https://blend.juspay.design |
Live apps |
Update blend.config.json → studio.apiUrl to switch.
your-existing-project/
├── blend.config.json ← NEW: Studio connection
├── src/
│ └── blend/ ← NEW: Auto-generated
│ ├── provider.tsx ← Theme wrapper
│ ├── tokens.ts ← Colors/fonts
│ └── theme.css ← Styles
└── package.json ← MODIFIED: Added deps
npm install
# Ensure you're in a workspace if using monorepoCheck CSS import exists in your entry file:
import '@juspay/blend-design-system/style.css'Add to tsconfig.json:
{
"compilerOptions": {
"moduleResolution": "bundler"
}
}Run init again:
npx blend-studio init- Installed packages (
npm i @juspay/blend-design-system) - Added CSS import
- Ran
npx blend-studio init(createsblend.config.json) - Ran
npx blend-studio brand - Wrapped app with
<BlendProvider> - Used a component (
<ButtonV2>) - Can login to Studio
- Can pull tokens
# 1. Go to your project
cd my-existing-vite-app
# 2. Install
npm i @juspay/blend-design-system blend-studio
# 3. Add CSS import to src/main.tsx
import '@juspay/blend-design-system/style.css'
# 4. Initialize (creates blend.config.json automatically)
npx blend-studio init
npx blend-studio brand
# 5. Wrap your app with BlendProvider
# 6. Use components!Done! 🎉