Back to blogs

Use PaceUI Blocks in a TanStack Start App

Install a PaceUI campaign overview block into a TanStack Start project with the shadcn CLI, then render it from a file-based route.

TanStack Start

PaceUI

TanStack Start apps can use PaceUI's React block source as part of their own interface. This walkthrough installs the app-analytics-4 campaign overview and renders it from a file-based route. The block is free and does not require a PaceUI registry token.

PaceUI blocks are copied into your codebase through the shadcn CLI. Confirm the block's listed dependencies and your project's styling setup before adding it.

1. Add the PaceUI registry

In the root components.json, add the PaceUI registry while preserving your existing configuration:

components.json
{
  "registries": {
    "@paceui": "https://paceui.com/r/{name}.json"
  }
}

For Pro blocks, configure the authorization header and PACEUI_REGISTRY_TOKEN as described in the installation docs.

2. Install a block

Run this command in the project directory:

Terminal
npx shadcn@latest add @paceui/app-analytics-4

The campaign overview block page includes its preview, source, and requirements. The block shows example campaign categories and progress values; plan to replace those with data from your app.

3. Render it from a TanStack Start route

In a file-based TanStack Start project, add a route such as src/routes/dashboard.tsx:

dashboard.tsx
import { createFileRoute } from "@tanstack/react-router";

import { Analytics4 } from "@/components/blocks/app/analytics/analytics-4";

export const Route = createFileRoute("/dashboard")({
component: DashboardPage,
});

function DashboardPage() {
return (
  <main className="mx-auto grid w-full max-w-6xl gap-6 p-6">
    <h1 className="text-2xl font-semibold">Campaign overview</h1>
    <Analytics4 />
  </main>
);
}

If your project uses different path aliases, update the import to match your tsconfig.json. Keep the route registered according to your TanStack Start setup. The example uses the block's built-in sample content; edit its installed source to connect your own campaign data.

Continue building