Skip to content

Commit 1e1629f

Browse files
committed
docs(styled/install): update installation guide to include tailwindcss-animate
1 parent 9844894 commit 1e1629f

File tree

2 files changed

+44
-59
lines changed

2 files changed

+44
-59
lines changed

apps/website/src/routes/docs/styled/(getting-started)/install/index.mdx

Lines changed: 44 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ pnpm qwik-ui add input
3434

3535
### Step 1: Install the Headless Kit and qwikest icons
3636

37-
To get started with the Styled Kit for Qwik UI, you first need to install the headless package and qwikest icons:
38-
3937
```zsh
40-
pnpm i -D @qwik-ui/headless @qwikest/icons
38+
pnpm i -D @qwik-ui/headless @qwikest/icons tailwindcss-animate
4139
```
4240

4341
### 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:
5048
@layer base {
5149
:root {
5250
--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%;
5654
--popover: 0 0% 100%;
57-
--popover-foreground: 222.2 47.4% 11.2%;
55+
--popover-foreground: 240 5.9% 10%;
5856
--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%;
6866
--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%;
7169
--border-width: 0px;
72-
--border-radius: 0;
70+
--border-radius: 0.5rem;
7371
--shadow-base: 0 1px 2px 0 rgba(0, 0, 0, 0.01);
7472
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
7573
--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:
8179
--transform-press: scale(0.95);
8280
}
8381
.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%;
9795
--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%;
10098
--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%;
103101
--border-width: 0px;
104-
--border-radius: 0;
102+
--border-radius: 0.5rem;
105103
--shadow-base: 0 1px 2px 0 rgba(0, 0, 0, 0.01);
106104
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
107105
--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:
120118
Finally, you need to modify your `tailwind.config.js` file:
121119

122120
```tsx
123-
const plugin = require('tailwindcss/plugin');
124-
125121
const { join } = require('path');
122+
const plugin = require('tailwindcss/plugin');
126123

127124
/** @type {import('tailwindcss').Config} */
128125
module.exports = {
126+
content: [join(__dirname, 'src/**/*.{js,ts,jsx,tsx,mdx}')],
129127
plugins: [
128+
require('tailwindcss-animate'),
130129
plugin(function ({ addUtilities }) {
131130
addUtilities({
132131
'.press': {
133132
transform: 'var(--transform-press)',
134133
},
135-
'.appear': {
136-
opacity: 1,
137-
},
138-
'.disappear': {
139-
opacity: 0,
140-
},
141134
});
142135
}),
143136
],
144-
145-
content: [join(__dirname, 'src/**/*.{js,ts,jsx,tsx,mdx}')],
146137
darkMode: 'class',
147138
theme: {
148-
screens: {
149-
sm: '640px',
150-
md: '768px',
151-
lg: '1024px',
152-
xl: '1280px',
153-
'2xl': '1536px',
154-
},
155-
important: true,
156139
extend: {
157140
colors: {
158141
border: 'hsl(var(--border))',
@@ -216,15 +199,18 @@ module.exports = {
216199
'2xl': 'var(--shadow-2xl)',
217200
inner: 'var(--shadow-inner)',
218201
},
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)',
221207
},
222208
},
223209
},
224210
};
225211
```
226212

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.
228214

229215
### Step 4: Find the components you need in the docs and copy/paste them into your project
230216

apps/website/tailwind.config.cjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ module.exports = {
2323
],
2424
darkMode: 'class',
2525
theme: {
26-
important: true,
2726
extend: {
2827
screens: {
2928
xs: '480px',

0 commit comments

Comments
 (0)