# TanStack Start · JGuang UI

> Install and configure JGuang UI for TanStack Start.

- Page: https://jiguang132.com/systems/jguang-ui/docs/installation/tanstack
- Based on: shadcn/ui documentation (MIT) @ bc0705384b51252af26dcc65425b216bf5eb063c

Choose the setup that matches your starting point.


  

[Use JGuang UI installation Build your preset and generate a TanStack project command.](#scaffold-with-create)


  

[Use the CLI Scaffold a new TanStack project from the terminal.](#scaffold-with-cli)


  

[Existing Project Configure JGuang UI manually in an existing TanStack project.](#existing-start-project)


## Use JGuang UI installation


### Build Your Preset

Open [JGuang UI installation](/systems/jguang-ui#install) and build your preset visually. Choose your style, colors, fonts, icons, and more.


  

[Open JGuang UI installation](/systems/jguang-ui#install)


### Create Project

Click `Create Project`, choose your package manager, and copy the generated command.

The generated command will look similar to this:

```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

The exact command will include your selected options such as `--base`, `--monorepo`, or `--rtl`.

### Add Components

Add the `Card` component to your project:

```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

If you created a monorepo, run the command from `apps/web` or specify the workspace from the repo root:

```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

The command above will add the `Card` component to your project. You can then import it like this:

```tsx showLineNumbers title="src/routes/index.tsx"
import { createFileRoute } from "@tanstack/react-router"

import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"

export const Route = createFileRoute("/")({
  component: App,
})

function App() {
  return (
    <Card className="max-w-sm">
      <CardHeader>
        <CardTitle>Project Overview</CardTitle>
        <CardDescription>
          Track progress and recent activity for your TanStack Start app.
        </CardDescription>
      </CardHeader>
      <CardContent>
        Your design system is ready. Start building your next component.
      </CardContent>
    </Card>
  )
}
```

If you created a monorepo, update `apps/web/src/routes/index.tsx` and import from `@workspace/ui/components/card` instead.


## Use the CLI


### Create Project

Run the `init` command to scaffold a new TanStack Start project. Follow the prompts to configure your project: base, preset, monorepo, and more.

```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

**For a monorepo project, use `--monorepo` flag:**

```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

### Add Components

Add the `Card` component to your project:

```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

If you created a monorepo, run the command from `apps/web` or specify the workspace from the repo root:

```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

The command above will add the `Card` component to your project. You can then import it like this:

```tsx showLineNumbers title="src/routes/index.tsx"
import { createFileRoute } from "@tanstack/react-router"

import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card"

export const Route = createFileRoute("/")({
  component: App,
})

function App() {
  return (
    <Card className="max-w-sm">
      <CardHeader>
        <CardTitle>Project Overview</CardTitle>
        <CardDescription>
          Track progress and recent activity for your TanStack Start app.
        </CardDescription>
      </CardHeader>
      <CardContent>
        Your design system is ready. Start building your next component.
      </CardContent>
    </Card>
  )
}
```

If you created a monorepo, update `apps/web/src/routes/index.tsx` and import from `@workspace/ui/components/card` instead.


## Existing Project


### Create Project

If you need a new TanStack Start project, create one first. Otherwise, skip this step.

```bash
npx @tanstack/cli@latest create
```

Choose TanStack Start, the React framework, and the recommended defaults so Tailwind CSS and the `@/*` import alias are configured for you.


Do not add the `JGuang UI Registry` add-on when prompted. The `JGuang UI Registry` CLI will configure JGuang UI later in this guide.


The TanStack CLI already configures Tailwind CSS and the default `@/*` import alias for you. If you're adding JGuang UI to an older or custom TanStack Start app, make sure both are configured before continuing.

### Run the CLI

Run the `JGuang UI Registry` init command to set up JGuang UI in your project.

```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

### Add Components

You can now start adding components to your project.

```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

The command above will add the `Button` component to your project. You can then import it like this:

```tsx showLineNumbers title="src/routes/index.tsx"
import { createFileRoute } from "@tanstack/react-router"

import { Button } from "@/components/ui/button"

export const Route = createFileRoute("/")({
  component: App,
})

function App() {
  return (
    <div className="flex min-h-svh items-center justify-center p-6">
      <Button>Click me</Button>
    </div>
  )
}
```

---

Index of all JGuang resources: https://jiguang132.com/llms.txt
