Set up your framework
The exact setup for Vite, Next.js, and TanStack Start. Our install test runs each one in a real app.
Get started · step 3 of 3 · 4 min read
Prompt for your agent
Your agent reads /docs/frameworks.md: the same text as this page, as Markdown.
Each framework below has the steps that our install test runs in a real app. Find your framework, and do its steps in order. Then add the theme and your first component, as Install shows.
Vite
1. Make the app
Use the React and TypeScript template.
2. Add Tailwind CSS 4
Install the packages:
Replace the whole content of src/index.css with this one line. The template rules (a dark-mode block, #root and h1 sizes) would override the theme.
Delete src/App.css, and remove its import from src/App.tsx.
3. Add the @ alias and the Tailwind plugin
Set the alias in tsconfig.json and in tsconfig.app.json:
Then write vite.config.ts with the Tailwind plugin and the same alias:
4. Set up Gelatin UI
This command writes components.json with the Gelatin UI registry.
Tested with create-vite 9.3.4.
Next.js
1. Make the app
This App Router template sets up Tailwind CSS 4 and the @ alias for you.
2. Set up Gelatin UI
This command writes components.json with the Gelatin UI registry.
Tested with create-next-app 16.4.5.
TanStack Start
1. Make the app
The React template sets up Tailwind CSS 4 and the @ alias for you.
2. Write components.json by hand
Do not run shadcn init. The template maps #/* in the imports of package.json. So init finds no alias and asks every question. Put this file in the project root:
Tested with @tanstack/cli 0.72.16.
What differs per framework
The components are the same in every app. Only four places differ:
Add the popup root
Base UI opens a popup (a menu, a dialog, a select) at the end of body. The theme sets body to relative. In the popup root file of the table, wrap the page in a div with the isolate class.
Next.js and TanStack Start wrap the children of body:
Vite wraps the app in src/main.tsx:
Now each popup opens above the page.
Fix common errors
Next steps
- Change the theme: change the colors, the radius, and the fonts.
- Connect the MCP server: let your agent find and add components.