REACT / VITE / NEXT.JS

The same components.
Your choice of setup.

Start a client app with React and Vite, or use Next.js App Router. The component APIs, styles and editable source stay the same.

REACT + VITE

A client app, your backend.

React Fast Refresh, TypeScript and a static production build. Connect your preferred router and service layer as the application grows.

Download Vite workspace

REACT + NEXT.JS

App Router, ready to extend.

Keep interactive UI in Client Components and add server data, routes or actions in your host application.

Download Next.js workspace

React with Vite

Every block and template has a Vite starter. Choose React + Vite from its Download starter menu, unzip into a new directory and use Node 22.13 or later within Node 22.

Terminal
npm install
npm run dev

Open http://127.0.0.1:5173, or the port printed by Vite. Edit src/App.tsx and src/styles.css. The included local workspaces supply both BLD8 packages; no BLD8 npm package is required.

React / TypeScript
// src/App.tsx — in a downloaded starter
import { ActivityFeed } from '@bld8/blocks';

export default function App() {
  return <div className="bblocks-root"><ActivityFeed /></div>;
}

The entry file imports the shared styles and wraps the app in UIProvider. Application edits use React Fast Refresh. After editing package source, rebuild the changed package so its compiled output and styles update.

Terminal
npm run build
npm run preview

The build rebuilds both packages, checks types and writes dist/. Preview serves that output locally for review. Static hosting, routing fallback and any API service are your application’s configuration.

Add source to an existing app.

Use a React 19 TypeScript application with shadcn initialised. The same registry works in Vite and Next.js, follows aliases.ui from components.json, and includes the compiled styles and licences.

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/timeline.json
npx shadcn@latest add https://ui.bld8.dev/r/activity-feed.json
React / TypeScript
import { ActivityFeed } from '@/components/ui/bld8/blocks/activity-feed';

export default function Activity() {
  return <div className="bblocks-root">
    <ActivityFeed records={[
      {id:'review', title:'Review completed', actor:'Alex',
       kind:'project', dateTime:'2026-10-28T10:40:00+11:00',
       time:'28 Oct · 10:40'}
    ]} />
  </div>;
}

The example uses the default alias. A custom UI alias changes the import path. Wrap overlays in UIProvider from your local bld8/overlays module, and set body { position: relative; } in global CSS. Reusable packages have no Next.js dependency.

Next.js App Router

The Next.js starter opens on http://localhost:3000. Install and run it with the same npm commands. Keep page data loading on the server and put state, event handlers and browser APIs in a small Client Component.

React / TypeScript
// app/activity.tsx
'use client';

import { ActivityFeed } from '@/components/ui/bld8/blocks/activity-feed';

export default function Activity() {
  return <div className="bblocks-root">
    <ActivityFeed records={[
      {id:'review', title:'Review completed', actor:'Alex',
       kind:'project', dateTime:'2026-10-28T10:40:00+11:00',
       time:'28 Oct · 10:40'}
    ]} />
  </div>;
}
React / TypeScript
// app/page.tsx — a Server Component
import Activity from './activity';

export default function Page() {
  return <main><h1>Workspace activity</h1><Activity /></main>;
}

Pass serialisable records across the server/client boundary. Keep credentials and database access on the server. With a ZIP starter or local workspace, import both BLD8 stylesheets once in the root layout; registry installations import their local styles.

Switching from Next.js to Vite

Reuse the BLD8 components, tokens, form state and service contracts. Move application-specific integration at the framework boundary; changing build tools does not migrate server behaviour or stored data.

What changes when moving a Next.js interface to Vite
Part of your appWhat to do in Vite
BLD8 components and CSSReuse the same source, props, tokens and stylesheets.
Client entry pointMount App through createRoot in src/main.tsx. Ordinary client-only modules do not need a use-client boundary.
Links, navigation and imagesReplace Next-specific components and router hooks with browser elements or your chosen client router.
Server Components, actions and API routesKeep or replace the backend separately. Call it through HTTP; a client-only Vite build does not execute server functions.
Environment valuesUse VITE_* only for public client configuration. Keep credentials and server-only values in the backend.
Local browser dataStorage belongs to its origin. Plan export/import or backend persistence when moving domains or ports.
DeploymentPublish dist/ after building. Configure base for a subpath and history fallback if using a client router.

The two HTTP-backed integration ZIPs currently include a Next.js sample API. The Vite versions of the catalogue blocks and templates are frontend starters; connect a separate API when using those integration examples.

Shared behaviour, shared styles.

Override the --bui-* tokens for your own colours, corners and motion. Keep contrast, visible focus and reduced-motion behaviour in either framework.

GOOD DETAILS, SHARED

Both options. Always free.

Every component, block and template uses MIT, including commercial use. Choose a framework when downloading; no account or payment is needed.

Contribute to the library