New: Shipper. Your coding agent plans, designs and builds with these blocks, then reviews its own work.

Docs

Install Vite

Start a React app with Vite, Tailwind CSS and shadcn/ui, then add your first block.

1

Create the app

Terminal
npm create vite@latest my-app -- --template react-ts
2

Add Tailwind CSS

Terminal
cd my-app
pnpm add tailwindcss @tailwindcss/vite

Replace everything in src/index.css with:

src/index.css
@import "tailwindcss";
3

Point @/ at src

shadcn/ui and every block import from @/. Add the alias to both tsconfig files:

tsconfig.json and tsconfig.app.json
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": { "@/*": ["./src/*"] }
  }
}

Then teach Vite the same alias and add the Tailwind plugin:

pnpm add -D @types/node
vite.config.ts
import path from "path";
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [react(), tailwindcss()],
  resolve: {
    alias: { "@": path.resolve(__dirname, "./src") },
  },
});
4

Set up shadcn/ui

pnpm dlx shadcn@latest init
5

Add the @twe registry

components.json
{
  "registries": {
    "@twe": "https://techwithemma.com/r/{name}.json"
  }
}
6

Install a block and show it

pnpm dlx shadcn@latest add @twe/cta-minimal-banner
src/App.tsx
import CtaBanner from "@/components/twe-element/cta-minimal-banner";

export default function App() {
  return <CtaBanner />;
}

Run npm run dev. Using TanStack Start or React Router instead? Follow shadcn/ui's setup for your framework, then continue from step 5.