Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: guide for shadcn/ui #9675

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions docs/repo-docs/guides/tools/shadcn-ui.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: shadcn/ui
description: Learn how to use shadcn/ui in a Turborepo.
---

import { PackageManagerTabs, Tab } from '#/components/tabs';

shadcn/ui is an open-source set of beautifully designed components made with Tailwind CSS that you can copy and paste into your apps.

To get started with shadcn/ui in a new monorepo, run:

<PackageManagerTabs>
<Tab>

```bash title="Terminal"
npx shadcn@canary init
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth having a callout about this only working on versions after 811bb59a8?

```

</Tab>

<Tab>

```bash title="Terminal"
npx shadcn@canary init
```

</Tab>

<Tab>

```bash title="Terminal"
pnpm dlx shadcn@canary init
```

</Tab>
</PackageManagerTabs>

When prompted, select the option for monorepos.

To add a component, run:

<PackageManagerTabs>
<Tab>

```bash title="Terminal"
npx shadcn@canary add [COMPONENT]
```

</Tab>

<Tab>

```bash title="Terminal"
npx shadcn@canary add [COMPONENT]
```

</Tab>

<Tab>

```bash title="Terminal"
pnpm dlx shadcn@canary add [COMPONENT]
```

</Tab>
</PackageManagerTabs>

## More information

To learn more about using shadcn/ui in Turborepo, [visit the docs for shadcn/ui](https://ui.shadcn.com/docs/monorepo).
Loading