React-Google-Apps-Script
React-Google-Apps-Script copied to clipboard
How to use shadcn/ui
Can anyone help me to configure this project to use shadcn/ui. Any help would be great. https://ui.shadcn.com/
I will try to write few instructions that i used to set up shadcn/ui
- Install Tailwind
npm install -D tailwindcss
npx tailwindcss init
- Add this line to your
tailwind.config.js-> content
'./src/**/*.{ts,tsx}'
- Init Shadcn
npx shadcn-ui@latest init
use
./src/client/componentsfor your component dir and./src/client/utilsfor utils dir when asked by cli
- create
global.cssfile in your./src/clientdir and add this
@tailwind base;
@tailwind components;
@tailwind utilities;
- import this file to your
index.jsof the client folder you want, as example, i want to use tailwind into./src/client/sidebar-about-page, so for that, i will import theglobal.cssin./src/client/sidebar-about-page/index.jslike this
import '../../global.css';
- Now install the components and use following Shadcn's docs as example
npx shadcn-ui@latest add button
Should be good to go!