@@ -34,10 +34,8 @@ pnpm qwik-ui add input
34
34
35
35
### Step 1: Install the Headless Kit and qwikest icons
36
36
37
- To get started with the Styled Kit for Qwik UI, you first need to install the headless package and qwikest icons:
38
-
39
37
``` zsh
40
- pnpm i -D @qwik-ui/headless @qwikest/icons
38
+ pnpm i -D @qwik-ui/headless @qwikest/icons tailwindcss-animate
41
39
```
42
40
43
41
### Step 2: copy/paste your theme config
@@ -50,26 +48,26 @@ For example, we use the following config by default on the Qwik UI docs:
50
48
@layer base {
51
49
:root {
52
50
--background : 0 0% 100% ;
53
- --foreground : 222.2 47.4 % 11.2 % ;
54
- --muted : 210 40 % 96.1 % ;
55
- --muted-foreground : 215.4 16.3 % 46.9 % ;
51
+ --foreground : 240 5.9 % 10 % ;
52
+ --muted : 240 4.8 % 95.9 % ;
53
+ --muted-foreground : 240 3.8 % 46.1 % ;
56
54
--popover : 0 0% 100% ;
57
- --popover-foreground : 222.2 47.4 % 11.2 % ;
55
+ --popover-foreground : 240 5.9 % 10 % ;
58
56
--card : 0 0% 100% ;
59
- --card-foreground : 222.2 47.4 % 11.2 % ;
60
- --border : 214.3 31.8 % 91.4 % ;
61
- --input : 214.3 31.8 % 91.4 % ;
62
- --primary : 191.6 91.4 % 36.5 % ;
63
- --primary-foreground : 0 0% 100 % ;
64
- --secondary : 214.3 31.8 % 91.4 % ;
65
- --secondary-foreground : 0 0% 0 % ;
66
- --accent : 210 40 % 96.1 % ;
67
- --accent-foreground : 222.2 47.4 % 11.2 % ;
57
+ --card-foreground : 240 5.9 % 10 % ;
58
+ --border : 240 5.9 % 90 % ;
59
+ --input : 240 5.9 % 90 % ;
60
+ --primary : 0 93.5 % 81.8 % ;
61
+ --primary-foreground : 0 0% 0 % ;
62
+ --secondary : 240 5.9 % 10 % ;
63
+ --secondary-foreground : 0 0% 100 % ;
64
+ --accent : 240 4.8 % 95.9 % ;
65
+ --accent-foreground : 240 5.9 % 10 % ;
68
66
--alert : 0 84.2% 60.2% ;
69
- --alert-foreground : 210 40 % 98% ;
70
- --ring : 222.2 47.4 % 11.2 % ;
67
+ --alert-foreground : 0 0 % 98% ;
68
+ --ring : 240 5.9 % 10 % ;
71
69
--border-width : 0px ;
72
- --border-radius : 0 ;
70
+ --border-radius : 0.5 rem ;
73
71
--shadow-base : 0 1px 2px 0 rgba (0 , 0 , 0 , 0.01 );
74
72
--shadow-sm : 0 1px 2px 0 rgba (0 , 0 , 0 , 0.05 );
75
73
--shadow : 0 1px 4px 0 rgba (0 , 0 , 0 , 0.1 ), 0 1px 5px 0px rgba (0 , 0 , 0 , 0.1 );
@@ -81,27 +79,27 @@ For example, we use the following config by default on the Qwik UI docs:
81
79
--transform-press : scale (0.95 );
82
80
}
83
81
.dark {
84
- --background : 222.2 84 % 4 .9% ;
85
- --foreground : 210 40 % 98% ;
86
- --muted : 217.2 32.6 % 17.5 % ;
87
- --muted-foreground : 215 20.2 % 65.1 % ;
88
- --popover : 222.2 84 % 4 .9% ;
89
- --popover-foreground : 210 40 % 98% ;
90
- --card : 222.2 84 % 4 .9% ;
91
- --card-foreground : 210 40 % 98% ;
92
- --border : 217.2 32.6 % 17.5 % ;
93
- --input : 217.2 32.6 % 17.5 % ;
94
- --primary : 191.6 91.4 % 36.5 % ;
95
- --primary-foreground : 0 0% 100 % ;
96
- --secondary : 214.3 31 .8% 91.4 % ;
82
+ --background : 240 10 % 3 .9% ;
83
+ --foreground : 0 0 % 98% ;
84
+ --muted : 240 3.7 % 15.9 % ;
85
+ --muted-foreground : 240 5 % 64.9 % ;
86
+ --popover : 240 10 % 3 .9% ;
87
+ --popover-foreground : 0 0 % 98% ;
88
+ --card : 240 10 % 3 .9% ;
89
+ --card-foreground : 0 0 % 98% ;
90
+ --border : 240 3.7 % 15.9 % ;
91
+ --input : 240 3.7 % 15.9 % ;
92
+ --primary : 0 93.5 % 81.8 % ;
93
+ --primary-foreground : 0 0% 0 % ;
94
+ --secondary : 240 4 .8% 95.9 % ;
97
95
--secondary-foreground : 0 0% 0% ;
98
- --accent : 217.2 32.6 % 17.5 % ;
99
- --accent-foreground : 210 40 % 98% ;
96
+ --accent : 240 3.7 % 15.9 % ;
97
+ --accent-foreground : 0 0 % 98% ;
100
98
--alert : 0 84.2% 60.2% ;
101
- --alert-foreground : 210 40 % 98% ;
102
- --ring : 212.7 26.8 % 83.9 ;
99
+ --alert-foreground : 0 0 % 98% ;
100
+ --ring : 240 4.9 % 83.9% ;
103
101
--border-width : 0px ;
104
- --border-radius : 0 ;
102
+ --border-radius : 0.5 rem ;
105
103
--shadow-base : 0 1px 2px 0 rgba (0 , 0 , 0 , 0.01 );
106
104
--shadow-sm : 0 1px 2px 0 rgba (0 , 0 , 0 , 0.05 );
107
105
--shadow : 0 1px 4px 0 rgba (0 , 0 , 0 , 0.1 ), 0 1px 5px 0px rgba (0 , 0 , 0 , 0.1 );
@@ -120,39 +118,24 @@ For example, we use the following config by default on the Qwik UI docs:
120
118
Finally, you need to modify your ` tailwind.config.js ` file:
121
119
122
120
``` tsx
123
- const plugin = require (' tailwindcss/plugin' );
124
-
125
121
const { join } = require (' path' );
122
+ const plugin = require (' tailwindcss/plugin' );
126
123
127
124
/** @type {import('tailwindcss').Config} */
128
125
module .exports = {
126
+ content: [join (__dirname , ' src/**/*.{js,ts,jsx,tsx,mdx}' )],
129
127
plugins: [
128
+ require (' tailwindcss-animate' ),
130
129
plugin (function ({ addUtilities }) {
131
130
addUtilities ({
132
131
' .press' : {
133
132
transform: ' var(--transform-press)' ,
134
133
},
135
- ' .appear' : {
136
- opacity: 1 ,
137
- },
138
- ' .disappear' : {
139
- opacity: 0 ,
140
- },
141
134
});
142
135
}),
143
136
],
144
-
145
- content: [join (__dirname , ' src/**/*.{js,ts,jsx,tsx,mdx}' )],
146
137
darkMode: ' class' ,
147
138
theme: {
148
- screens: {
149
- sm: ' 640px' ,
150
- md: ' 768px' ,
151
- lg: ' 1024px' ,
152
- xl: ' 1280px' ,
153
- ' 2xl' : ' 1536px' ,
154
- },
155
- important: true ,
156
139
extend: {
157
140
colors: {
158
141
border: ' hsl(var(--border))' ,
@@ -216,15 +199,18 @@ module.exports = {
216
199
' 2xl' : ' var(--shadow-2xl)' ,
217
200
inner: ' var(--shadow-inner)' ,
218
201
},
219
- fontFamily: {
220
- sans: [' Inter Variable' , ' sans-serif' ],
202
+ strokeWidth: {
203
+ 0 : ' 0' ,
204
+ base: ' var(--stroke-width)' ,
205
+ 1 : ' calc(var(--stroke-width) + 1px)' ,
206
+ 2 : ' calc(var(--stroke-width) + 2px)' ,
221
207
},
222
208
},
223
209
},
224
210
};
225
211
```
226
212
227
- This might seem like a lot of configuration, but we believe it to be worth it as it is what allows changing styles and themes at the click of a button.
213
+ This might seem like a lot of configuration, but we believe it to be worth it because it allows changing your entire application's theme at the click of a button.
228
214
229
215
### Step 4: Find the components you need in the docs and copy/paste them into your project
230
216
0 commit comments