Logged in as: {userId}
:Not logged in
} 33 36 39Count: {count}
13 14Room: {roomId}
13Count: {count}
14 15Current theme: {isDark ? "dark" : "light"}
28
6
2
```
### Fonts
[Section titled “Fonts”](#fonts)
Host custom font files for your application:
```css
1
/* In your CSS */
2
@font-face {
3
font-family: "BrandFont";
4
src: url("/fonts/brand-font.woff2") format("woff2");
5
font-weight: 400;
6
font-style: normal;
7
}
8
9
/* Then use it with Tailwind */
10
@theme {
11
--font-brand: "BrandFont", sans-serif;
12
}
```
### Favicon and Browser Icons
[Section titled “Favicon and Browser Icons”](#favicon-and-browser-icons)
Store favicon and other browser icons:
```tsx
1
// In your Document.tsx
2
3
4
5
6
```
Security Considerations
Remember that all files in the public directory are accessible to anyone who knows the URL. Don’t store sensitive information in this directory.
## Production Considerations
[Section titled “Production Considerations”](#production-considerations)
In production, files in the public directory:
* Do not go through the JavaScript bundling process
* Maintain their file structure and naming
## Further Reading
[Section titled “Further Reading”](#further-reading)
* [Static File Serving in Vite](https://vitejs.dev/guide/assets.html#the-public-directory)
* [Image Optimization Best Practices](https://web.dev/fast/#optimize-your-images)
* [Web Font Best Practices](https://web.dev/font-best-practices/)
# shadcn/ui
> A comprehensive guide to installing and configuring ShadCN UI components within RedwoodSDK projects, with step-by-step instructions for proper integration with TailwindCSS v4.
## Installing shadcn/ui
[Section titled “Installing shadcn/ui”](#installing-shadcnui)
1. [Install TailwindCSS](/guides/frontend/tailwind).
2. Install shadcn/ui
* npm
```sh
npx shadcn@latest init
```
* pnpm
```sh
pnpx shadcn@latest init
```
* yarn
```sh
yarn dlx shadcn@latest init
```
It will ask you what theme you want to use. 
This command will create a `components.json` file in the root of your project. It contains all the configuration for our shadcn/ui components.
If you want to match RedwoodSDK conventions, add the following aliases to the `components.json` file:
components.json
```json
...
"aliases": {
"components": "@/app/components",
"utils": "@/app/lib/utils",
"ui": "@/app/components/ui",
"lib": "@/app/lib",
"hooks": "@/app/hooks"
},
...
```
shadcn/ui Organization
In our configuration, the `lib` directory is nested inside the `app` directory. The shadcn/ui command line tool may not honor our setup, creating another `lib` directory in the `src` (or `@`) directory. You’ll need to manually move the folder to the `app` directory.
If you’re copying and pasting code from the shadcn/ui website, you’ll also need to update the import paths.
3. Now, you should be able to add components: You can add components in bulk by running:
* npm
```sh
npx shadcn@latest add
```
* pnpm
```sh
pnpx shadcn@latest add
```
* yarn
```sh
yarn dlx shadcn@latest add
```
Or, you can add a single component by running:
* npm
```sh
npx shadcn@latest add 7 {ctx.user?.username 8 ? `You are logged in as user ${ctx.user.username}` 9 : "You are not logged in"} 10
119 {ctx.user?.username 10 ? `You are logged in as user ${ctx.user.username}` 11 : "You are not logged in"} 12
13 +{error instanceof Error ? error.message : "An error occurred"}
9