# TanStack Start · JGuang UI

> Create a new TanStack Start project with RTL support.

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

**Starting a new project?** Use [JGuang UI installation](/systems/jguang-ui#install) for a fully configured TanStack Start app with custom themes, Base UI or Radix, and icon libraries.


### Create Project

Create a new project using the `--rtl` flag and the `start` template.

**You can skip this step if you have already created a project using [JGuang UI installation](/systems/jguang-ui#install).**

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

This will create a `components.json` file with the `rtl: true` flag.

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

### Add DirectionProvider

Add the `dir="rtl"` and `lang="ar"` attributes to the `html` tag. Update `lang="ar"` to your target language.

Then wrap your app with the `DirectionProvider` component with the `direction="rtl"` prop in your `__root.tsx`:

```tsx title="src/routes/__root.tsx" showLineNumbers {1,9,14-16}
import { DirectionProvider } from "@/components/ui/direction"

export const Route = createRootRoute({
  component: RootComponent,
})

function RootComponent() {
  return (
    <html lang="ar" dir="rtl">
      <head>
        <Meta />
      </head>
      <body>
        <DirectionProvider direction="rtl">{children}</DirectionProvider>
        <Scripts />
      </body>
    </html>
  )
}
```

### Add Font

For the best RTL experience, we recommend using fonts that have proper support for your target language. [Noto](https://fonts.google.com/noto) is a great font family for this and it pairs well with Inter and Geist.

Install the font using [Fontsource](https://fontsource.org/fonts/noto-sans-arabic):

```bash
npm install @fontsource-variable/noto-sans-arabic
```

Import the font in your `styles.css`:

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

For other languages, eg. Hebrew, you can use `@fontsource-variable/noto-sans-hebrew`.

### Add Components

You are now ready to add components to your project. The CLI will take care of handling RTL support for you.

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

---

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