@@ -36,13 +36,13 @@ npx create-remix@latest
36
36
1 . Install ` tailwindcss ` and its peer dependencies:
37
37
38
38
``` bash
39
- npm i -D tailwindcss
39
+ npm install -D tailwindcss postcss autoprefixer
40
40
```
41
41
42
- 2 . Generate ` tailwind.config.ts ` file :
42
+ 2 . Generate ` tailwind.config.ts ` and ` postcss.config.js ` files :
43
43
44
44
``` bash
45
- npx tailwindcss init --ts
45
+ npx tailwindcss init --ts -p
46
46
```
47
47
48
48
3 . Add the paths to all of your template files in your ` tailwind.config.ts ` file:
@@ -69,8 +69,9 @@ export default {
69
69
70
70
5 . Import the newly - created ` ./app/tailwind.css ` file in your ` ./app/root.tsx ` file :
71
71
72
- ``` tsx {1,5}
73
- import stylesheet from " ~/tailwind.css" ;
72
+ ``` tsx {1,2,4-7}
73
+ import { LinksFunction } from " @remix-run/node" ;
74
+ import stylesheet from " ~/tailwind.css?url" ;
74
75
75
76
export const links: LinksFunction = () => [
76
77
// ...
@@ -120,7 +121,7 @@ In server side rendered applications, such as Remix, to avoid page flicker (if `
120
121
121
122
import { ThemeModeScript } from " flowbite-react" ;
122
123
123
- export default function App () {
124
+ export default function Layout () {
124
125
return (
125
126
<html lang = " en" >
126
127
<head >
@@ -137,6 +138,8 @@ export default function App() {
137
138
Now that you have successfully installed Flowbite React you can start using the components from the library.
138
139
139
140
``` tsx
141
+ // app/routes/_index.tsx
142
+
140
143
import { Button } from " flowbite-react" ;
141
144
142
145
export default function Index() {
0 commit comments