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 workspaceREACT / VITE / NEXT.JS
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
React Fast Refresh, TypeScript and a static production build. Connect your preferred router and service layer as the application grows.
Download Vite workspaceREACT + NEXT.JS
Keep interactive UI in Client Components and add server data, routes or actions in your host application.
Download Next.js workspaceEvery 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.
npm install
npm run devOpen 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.
// 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.
npm run build
npm run previewThe 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.
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.
npx shadcn@latest add https://ui.bld8.dev/r/timeline.json
npx shadcn@latest add https://ui.bld8.dev/r/activity-feed.jsonimport { 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.
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.
// 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>;
}// 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.
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.
| Part of your app | What to do in Vite |
|---|---|
| BLD8 components and CSS | Reuse the same source, props, tokens and stylesheets. |
| Client entry point | Mount App through createRoot in src/main.tsx. Ordinary client-only modules do not need a use-client boundary. |
| Links, navigation and images | Replace Next-specific components and router hooks with browser elements or your chosen client router. |
| Server Components, actions and API routes | Keep or replace the backend separately. Call it through HTTP; a client-only Vite build does not execute server functions. |
| Environment values | Use VITE_* only for public client configuration. Keep credentials and server-only values in the backend. |
| Local browser data | Storage belongs to its origin. Plan export/import or backend persistence when moving domains or ports. |
| Deployment | Publish 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.
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
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