You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ej2-vue/appearance/css-variables.md
+46-4Lines changed: 46 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -17,16 +17,19 @@ Syncfusion currently offers two modern and highly customizable themes using CSS
17
17
* Material 3 Theme
18
18
* Fluent 2 Theme
19
19
* Bootstrap 5.3 Theme
20
+
* Tailwind 3.4 Theme
20
21
21
22
## CSS themes - Syncfusion Vue components
22
23
23
-
[Material 3](https://m3.material.io/), [Fluent 2](https://fluent2.microsoft.design/get-started/whatisnew) and [Bootstrap 5.3](https://getbootstrap.com/docs/5.3/getting-started/introduction/) themes have been introduced across all EJ2 Controls, featuring both `light` and `dark` variants. This themes utilizes `CSS variables` to allow easy customization of control colors in CSS format. With this implementation, users can seamlessly switch between light and dark color schemes, providing a flexible solution to meet their preferences and application needs.
24
+
[Material 3](https://m3.material.io/), [Fluent 2](https://fluent2.microsoft.design/get-started/whatisnew), [Bootstrap 5.3](https://getbootstrap.com/docs/5.3/getting-started/introduction/) and [Tailwind 3.4](https://tailwindcss.com/docs/installation) themes have been introduced across all EJ2 Controls, featuring both `light` and `dark` variants. This themes utilizes `CSS variables` to allow easy customization of control colors in CSS format. With this implementation, users can seamlessly switch between light and dark color schemes, providing a flexible solution to meet their preferences and application needs.
24
25
25
26
> Kindly note that in the Material 3 theme, CSS variables with rgb() values are used for color variables. The use of hex values in this context may lead to improper functionality. For example, in previous versions of the Material theme or other themes, the primary color variable was defined as follows: $primary: #6200ee;. However, in the Material 3 theme, the primary color variable is defined as follows: --color-sf-primary: 98, 0, 238;.
26
27
27
28
### Utilization of CSS variables in modern themes
28
29
29
-
Modern themes like Material 3, Fluent 2 and Bootstrap 5.3 incorporate support with CSS variables, where `Material 3` utilizes `rgb()` values for customizing colors while `Fluent 2` uses `hex` values for color customization. `Bootstrap 5.3` allows color customization with both `rgb()` and `hex` values. For more information you can refer this [documentation](./theme#syncfusion-material-3-theme) for color variables of these themes. The examples below shows CSS variables with their values used for the respective themes.
30
+
Modern themes make it easy to change the colors of controls using CSS variables. Each theme has its own way of setting these variables, so it's important to follow the specific instructions for each theme. Doing this helps keep the styling consistent and efficient across different parts of your application.
31
+
32
+
Below are examples of how CSS variables can be defined for these themes:
30
33
31
34
{% tabs %}
32
35
{% highlight ts tabtitle="material3.css" %}
@@ -38,6 +41,9 @@ Modern themes like Material 3, Fluent 2 and Bootstrap 5.3 incorporate support wi
38
41
{% highlight ts tabtitle="bootstrap5.3.css" %}
39
42
{% include code-snippet/common/css-value-cs1/bootstrap5.3.css %}
40
43
{% endhighlight %}
44
+
{% highlight css tabtitle="tailwind3.4.css" %}
45
+
{% include code-snippet/common/css-value-cs1/tailwind3.css %}
46
+
{% endhighlight %}
41
47
{% endtabs %}
42
48
43
49
### How to get these themes?
@@ -52,9 +58,11 @@ To access themes provided by Syncfusion, you have two primary options,
With this CSS variable support, you can effortlessly customize the color variable values for Syncfusion Vue Components.
120
146
121
147
### Switching Light and Dark mode with CSS variables
122
148
123
-
Switching between modes has become easier with the updated modern themes, which offer Light and Dark variants. In both the `Material 3` and `Fluent 2` light themes, there are distinct class variables for light and dark modes in a `single file`, providing flexibility for seamless switching between the two modes within your application.
149
+
Switching between modes has become easier with the updated modern themes, which offer Light and Dark variants. In all themes, there are distinct class variables for light and dark modes in a `single file`, providing flexibility for seamless switching between the two modes within your application.
124
150
125
151
{% tabs %}
126
152
{% highlight html tabtitle="app.vue" %}
@@ -154,9 +180,21 @@ Similar to `Fluent 2`, we offer both Light and Dark variants with `Bootstrap 5.3
Similar to `Fluent 2`, we offer both Light and Dark variants with `Tailwind 3.4`. In the Tailwind 3.4 theme, there are distinct class variables for light and dark modes, as shown in the preview below.
186
+
187
+
{% tabs %}
188
+
{% highlight html tabtitle="app.vue" %}
189
+
{% include code-snippet/common/tailwind3-cs1/app.vue %}
To activate dark mode, just append the `e-dark-mode` class to the body section of your application for both `Material 3`, `Fluent 2` and `Bootstrap 5.3` themes. Once applied, the theme seamlessly switches to dark mode. Please refer to the example image below for visual guidance.
197
+
To activate dark mode, just append the `e-dark-mode` class to the body section of your application for both `Material 3`, `Fluent 2`, `Bootstrap 5.3` and `Tailwind 3.4` themes. Once applied, the theme seamlessly switches to dark mode. Please refer to the example image below for visual guidance.
160
198
161
199
`Material 3` dark mode
162
200
@@ -170,6 +208,10 @@ To activate dark mode, just append the `e-dark-mode` class to the body section o
170
208
171
209

172
210
211
+
`Tailwind 3.4` dark mode
212
+
213
+

214
+
173
215
### ThemeStudio Application
174
216
175
217
The ThemeStudio application now includes seamless integration with the Material 3, Fluent 2 and Bootstrap 5.3 themes, offering a comprehensive solution for customization requirements. This enhancement enables users to effortlessly customize and personalize their themes.
Copy file name to clipboardExpand all lines: ej2-vue/appearance/theme.md
+211Lines changed: 211 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ The Syncfusion Vue library has provided the below list of in-built themes,
14
14
15
15
|Theme |Style Sheet Name|
16
16
|--------|--------|
17
+
|Tailwind 3.4 | tailwind3.css |
18
+
|Tailwind 3.4 Dark | tailwind3-dark.css |
17
19
|Bootstrap 5.3 | bootstrap5.3.css |
18
20
|Bootstrap 5.3 Dark | bootstrap5.3-dark.css |
19
21
|Fluent 2 | fluent2.css |
@@ -148,6 +150,215 @@ To refer to individual component's optimized CSS files from an individual packag
148
150
149
151
The below list of common variables used in the Syncfusion Vue library themes for all components. You can change these variables to customize the corresponding theme.
150
152
153
+
### Syncfusion Tailwind 3.4 theme
154
+
155
+
<table>
156
+
<style>
157
+
.circle-color-indicator {
158
+
width: 1.5em;
159
+
height: 1.5em;
160
+
border-radius: 50%;
161
+
display: inline-block;
162
+
border: 1px solid rgba(0, 0, 0, .08);
163
+
vertical-align: middle;
164
+
}
165
+
th, td {
166
+
text-align: left;
167
+
padding: 5px 15px;
168
+
vertical-align: top;
169
+
}
170
+
</style>
171
+
<thead>
172
+
<tr>
173
+
<th>Name</th>
174
+
<th>Value (Default Theme) </th>
175
+
<th>Value (Dark Theme) </th>
176
+
</tr>
177
+
</thead>
178
+
<tbody>
179
+
<tr>
180
+
<td>--color-sf-black</td>
181
+
<td>
182
+
<span class="circle-color-indicator" style="background: rgb(0,0,0)"></span> rgb(0,0,0)
183
+
</td>
184
+
<td>
185
+
<span class="circle-color-indicator" style="background: rgb(0,0,0)"></span> rgb(0,0,0)
186
+
</td>
187
+
</tr>
188
+
<tr>
189
+
<td>--color-sf-white</td>
190
+
<td>
191
+
<span class="circle-color-indicator" style="background: rgb(255,255,255)"></span> rgb(255,255,255)
192
+
</td>
193
+
<td>
194
+
<span class="circle-color-indicator" style="background: rgb(255,255,255)"></span> rgb(255,255,255)
195
+
</td>
196
+
</tr>
197
+
<tr>
198
+
<td>--color-sf-primary</td>
199
+
<td>
200
+
<span class="circle-color-indicator" style="background: rgba(79, 70, 229)"></span> rgba(79, 70, 229)
201
+
</td>
202
+
<td>
203
+
<span class="circle-color-indicator" style="background: rgba(99, 102, 241)"></span> rgba(99, 102, 241)
204
+
</td>
205
+
</tr>
206
+
<tr>
207
+
<td>--color-sf-primary-text-color</td>
208
+
<td>
209
+
<span class="circle-color-indicator" style="background: #fff"></span> #fff
210
+
</td>
211
+
<td>
212
+
<span class="circle-color-indicator" style="background: #fff"></span> #fff
213
+
</td>
214
+
</tr>
215
+
<tr>
216
+
<td>--color-sf-primary-light</td>
217
+
<td>
218
+
<span class="circle-color-indicator" style="background: #3730a3"></span> #3730a3
219
+
</td>
220
+
<td>
221
+
<span class="circle-color-indicator" style="background: #3730a3"></span> #3730a3
222
+
</td>
223
+
</tr>
224
+
<tr>
225
+
<td>--color-sf-primary-lighter</td>
226
+
<td>
227
+
<span class="circle-color-indicator" style="background: #e0e7ff"></span> #e0e7ff
228
+
</td>
229
+
<td>
230
+
<span class="circle-color-indicator" style="background: #1e1b4b"></span> #1e1b4b
231
+
</td>
232
+
</tr>
233
+
<tr>
234
+
<td>--color-sf-primary-dark</td>
235
+
<td>
236
+
<span class="circle-color-indicator" style="background: #4338ca"></span> #4338ca
237
+
</td>
238
+
<td>
239
+
<span class="circle-color-indicator" style="background: #818cf8"></span> #818cf8
240
+
</td>
241
+
</tr>
242
+
<tr>
243
+
<td>--color-sf-primary-darker</td>
244
+
<td>
245
+
<span class="circle-color-indicator" style="background: #3730a3"></span> #3730a3
246
+
</td>
247
+
<td>
248
+
<span class="circle-color-indicator" style="background: #4f46e5"></span> #4f46e5
249
+
</td>
250
+
</tr>
251
+
<tr>
252
+
<td>--color-sf-success</td>
253
+
<td>
254
+
<span class="circle-color-indicator" style="background: #15803d"></span> #15803d
255
+
</td>
256
+
<td>
257
+
<span class="circle-color-indicator" style="background: #22c55e"></span> #22c55e
258
+
</td>
259
+
</tr>
260
+
<tr>
261
+
<td>--color-sf-info</td>
262
+
<td>
263
+
<span class="circle-color-indicator" style="background: #0e7490"></span> #0e7490
264
+
</td>
265
+
<td>
266
+
<span class="circle-color-indicator" style="background: #38bdf8"></span> #38bdf8
267
+
</td>
268
+
</tr>
269
+
<tr>
270
+
<td>--color-sf-warning</td>
271
+
<td>
272
+
<span class="circle-color-indicator" style="background: #c2410c"></span> #c2410c
273
+
</td>
274
+
<td>
275
+
<span class="circle-color-indicator" style="background: #f97316"></span> #f97316
276
+
</td>
277
+
</tr>
278
+
<tr>
279
+
<td>--color-sf-danger</td>
280
+
<td>
281
+
<span class="circle-color-indicator" style="background: #dc2626"></span> #dc2626
282
+
</td>
283
+
<td>
284
+
<span class="circle-color-indicator" style="background: #f87171"></span> #f87171
285
+
</td>
286
+
</tr>
287
+
<tr>
288
+
<td>--color-sf-success-light</td>
289
+
<td>
290
+
<span class="circle-color-indicator" style="background: #dcfce7"></span> #dcfce7
291
+
</td>
292
+
<td>
293
+
<span class="circle-color-indicator" style="background: #164c37"></span> #164c37
294
+
</td>
295
+
</tr>
296
+
<tr>
297
+
<td>--color-sf-info-light</td>
298
+
<td>
299
+
<span class="circle-color-indicator" style="background: #cffafe"></span> #cffafe
300
+
</td>
301
+
<td>
302
+
<span class="circle-color-indicator" style="background: #0e485b"></span> #0e485b
303
+
</td>
304
+
</tr>
305
+
<tr>
306
+
<td>--color-sf-warning-light</td>
307
+
<td>
308
+
<span class="circle-color-indicator" style="background: #ffedd5"></span> #ffedd5
309
+
</td>
310
+
<td>
311
+
<span class="circle-color-indicator" style="background: #573422"></span> #573422
312
+
</td>
313
+
</tr>
314
+
<tr>
315
+
<td>--color-sf-danger-light</td>
316
+
<td>
317
+
<span class="circle-color-indicator" style="background: #fee2e2"></span> #fee2e2
318
+
</td>
319
+
<td>
320
+
<span class="circle-color-indicator" style="background: #54252f"></span> #54252f
321
+
</td>
322
+
</tr>
323
+
<tr>
324
+
<td>--color-sf-success-dark</td>
325
+
<td>
326
+
<span class="circle-color-indicator" style="background: #166534"></span> #166534
327
+
</td>
328
+
<td>
329
+
<span class="circle-color-indicator" style="background: #4ade80"></span> #4ade80
330
+
</td>
331
+
</tr>
332
+
<tr>
333
+
<td>--color-sf-info-dark</td>
334
+
<td>
335
+
<span class="circle-color-indicator" style="background: #155e75"></span> #155e75
336
+
</td>
337
+
<td>
338
+
<span class="circle-color-indicator" style="background: #38bdf8"></span> #38bdf8
339
+
</td>
340
+
</tr>
341
+
<tr>
342
+
<td>--color-sf-warning-dark</td>
343
+
<td>
344
+
<span class="circle-color-indicator" style="background: #9a3412"></span> #9a3412
345
+
</td>
346
+
<td>
347
+
<span class="circle-color-indicator" style="background: #fb923c"></span> #fb923c
348
+
</td>
349
+
</tr>
350
+
<tr>
351
+
<td>--color-sf-danger-dark</td>
352
+
<td>
353
+
<span class="circle-color-indicator" style="background: #b91c1c"></span> #b91c1c
354
+
</td>
355
+
<td>
356
+
<span class="circle-color-indicator" style="background: #ef4444"></span> #ef4444
0 commit comments