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: fix Remix setup doc #3725

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
75 changes: 38 additions & 37 deletions apps/www/content/docs/installation/remix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,11 @@ Start by creating a new Remix project using `create-remix`:
npx create-remix@latest my-app
```

### Run the CLI

Run the `shadcn-ui` init command to setup your project:

```bash
npx shadcn-ui@latest init
```

### Configure components.json

You will be asked a few questions to configure `components.json`:

```txt showLineNumbers
Would you like to use TypeScript (recommended)? no / yes
Which style would you like to use? › Default
Which color would you like to use as base color? › Slate
Where is your global CSS file? › app/tailwind.css
Do you want to use CSS variables for colors? › no / yes
Where is your tailwind.config.js located? › tailwind.config.js
Configure the import alias for components: › ~/components
Configure the import alias for utils: › ~/lib/utils
Are you using React Server Components? › no
```

### App structure

<Callout>

**Note**: This app structure is only a suggestion. You can place the files wherever you want.

</Callout>

- Place the UI components in the `app/components/ui` folder.
- Your own components can be placed in the `app/components` folder.
- The `app/lib` folder contains all the utility functions. We have a `utils.ts` where we define the `cn` helper.
- The `app/tailwind.css` file contains the global CSS.

### Install Tailwind CSS

```bash
npm add -D tailwindcss@latest autoprefixer@latest
npx tailwindcss init
shihui-huang marked this conversation as resolved.
Show resolved Hide resolved
```

Then we create a `postcss.config.js` file:
Expand Down Expand Up @@ -92,6 +56,43 @@ export const links: LinksFunction = () => [
]
```

### Run the CLI

Run the `shadcn-ui` init command to setup your project:

```bash
npx shadcn-ui@latest init
```

### Configure components.json

You will be asked a few questions to configure `components.json`:

```txt showLineNumbers
Would you like to use TypeScript (recommended)? no / yes
Which style would you like to use? › Default
Which color would you like to use as base color? › Slate
Where is your global CSS file? › app/tailwind.css
Do you want to use CSS variables for colors? › no / yes
Where is your tailwind.config.js located? › tailwind.config.js
shihui-huang marked this conversation as resolved.
Show resolved Hide resolved
Configure the import alias for components: › ~/components
Configure the import alias for utils: › ~/lib/utils
Are you using React Server Components? › no
```

### App structure

<Callout>

**Note**: This app structure is only a suggestion. You can place the files wherever you want.

</Callout>

- Place the UI components in the `app/components/ui` folder.
- Your own components can be placed in the `app/components` folder.
- The `app/lib` folder contains all the utility functions. We have a `utils.ts` where we define the `cn` helper.
- The `app/tailwind.css` file contains the global CSS.

### That's it

You can now start adding components to your project.
Expand Down