Weftv0.4.0
GitHubFigma
Blade AI

Installation

Add Weft to a Next.js app in five steps. Takes about two minutes.

RequiresReact 18+Node 18+TypeScript optional
1

Install the package

Pick your package manager. One click copies the command.

$ npm install @blade-ai/weft@github:getblade/weft
2

Configure Next.js and PostCSS

Weft ships source files, so Next.js has to transpile the package and PostCSS has to run Tailwind v4 over it.

next.config.ts
import type { NextConfig } from "next"; const nextConfig: NextConfig = { // Weft ships raw TypeScript and Tailwind source with no build step. transpilePackages: ["@blade-ai/weft"], }; export default nextConfig;
postcss.config.mjs
export { default } from "@blade-ai/weft/postcss.config";
3

Import the CSS

Once, in your global stylesheet. It loads the Blade tokens and the Tailwind setup the components use.

app/globals.css
@import "@blade-ai/weft/globals.css";
4

Wrap your app in WeftProvider

The provider sets the theme and makes the tokens available to every component.

app/layout.tsx
import "./globals.css"; import { WeftProvider } from "@blade-ai/weft/components/weft-provider"; export default function RootLayout({ children }) { return ( <html lang="en"> <body> <WeftProvider theme="light">{children}</WeftProvider> </body> </html> ); }
5

Use your first component

Import a Button and render it. That’s it.

app/page.tsx
import { Button } from "@blade-ai/weft/components/button"; export default function Page() { return ( <div className="actions"> <Button variant="primary">Create workspace</Button> <Button variant="secondary">Cancel</Button> </div> ); }

Framework guides

Setup notes for the frameworks we test against.

Next.js
App Router and Server Components. Provider goes in app/layout.tsx.
Read guide →
Vite
React + Vite. Import the CSS and provider in src/main.tsx.
Read guide →
Remix
Add the stylesheet to links() and wrap the root Outlet.
Read guide →
Connect your AI (MCP)
Add the Weft MCP server and your coding agent reads every component spec as it builds.
.mcp.json
{ "mcpServers": { "weft": { "command": "npx", "args": ["-y", "@blade-ai/weft", "mcp"] } } }