@maz-ui/mcp 4.9.3 → 5.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp.mjs +1 -1
- package/docs/generated-docs/maz-alert.doc.md +1 -1
- package/docs/generated-docs/maz-avatar.doc.md +1 -1
- package/docs/generated-docs/maz-badge.doc.md +8 -8
- package/docs/generated-docs/maz-btn.doc.md +26 -26
- package/docs/generated-docs/maz-card.doc.md +19 -19
- package/docs/generated-docs/maz-chart.doc.md +8 -8
- package/docs/generated-docs/maz-container.doc.md +20 -20
- package/docs/generated-docs/maz-drawer.doc.md +8 -8
- package/docs/generated-docs/maz-dropdown.doc.md +1 -1
- package/docs/generated-docs/maz-dropzone.doc.md +2 -2
- package/docs/generated-docs/maz-gallery.doc.md +15 -15
- package/docs/generated-docs/maz-icon.doc.md +11 -14
- package/docs/generated-docs/maz-input.doc.md +38 -38
- package/docs/generated-docs/maz-lazy-img.doc.md +18 -0
- package/docs/generated-docs/maz-link.doc.md +9 -9
- package/docs/generated-docs/maz-pagination.doc.md +9 -9
- package/docs/generated-docs/maz-popover.doc.md +5 -1
- package/docs/generated-docs/maz-radio-buttons.doc.md +17 -17
- package/docs/generated-docs/maz-select.doc.md +2 -2
- package/docs/generated-docs/maz-skeleton.doc.md +10 -10
- package/docs/generated-docs/maz-table.doc.md +37 -37
- package/docs/generated-docs/maz-textarea.doc.md +1 -1
- package/docs/generated-docs/maz-timeline.doc.md +1 -1
- package/docs/src/blog/v4.md +7 -7
- package/docs/src/blog/v5.md +186 -0
- package/docs/src/components/maz-accordion.md +1 -1
- package/docs/src/components/maz-alert.md +15 -15
- package/docs/src/components/maz-animated-counter.md +4 -4
- package/docs/src/components/maz-avatar.md +2 -2
- package/docs/src/components/maz-backdrop.md +7 -7
- package/docs/src/components/maz-badge.md +12 -30
- package/docs/src/components/maz-bottom-sheet.md +74 -74
- package/docs/src/components/maz-btn-group.md +17 -17
- package/docs/src/components/maz-btn.md +127 -94
- package/docs/src/components/maz-card-spotlight.md +5 -5
- package/docs/src/components/maz-card.md +20 -20
- package/docs/src/components/maz-carousel.md +14 -14
- package/docs/src/components/maz-chart.md +23 -4
- package/docs/src/components/maz-checkbox.md +3 -3
- package/docs/src/components/maz-checklist.md +19 -19
- package/docs/src/components/maz-circular-progress-bar.md +4 -4
- package/docs/src/components/maz-container.md +52 -37
- package/docs/src/components/maz-date-picker.md +7 -7
- package/docs/src/components/maz-dialog-confirm.md +2 -2
- package/docs/src/components/maz-drawer.md +14 -14
- package/docs/src/components/maz-dropdown.md +27 -12
- package/docs/src/components/maz-dropzone.md +6 -6
- package/docs/src/components/maz-expand-animation.md +2 -2
- package/docs/src/components/maz-fullscreen-loader.md +2 -2
- package/docs/src/components/maz-gallery.md +1 -1
- package/docs/src/components/maz-icon.md +113 -60
- package/docs/src/components/maz-input-code.md +1 -1
- package/docs/src/components/maz-input-phone-number.md +89 -88
- package/docs/src/components/maz-input-tags.md +2 -2
- package/docs/src/components/maz-input.md +42 -12
- package/docs/src/components/maz-link.md +28 -12
- package/docs/src/components/maz-pagination.md +2 -2
- package/docs/src/components/maz-popover.md +236 -236
- package/docs/src/components/maz-pull-to-refresh.md +2 -2
- package/docs/src/components/maz-radio-buttons.md +11 -11
- package/docs/src/components/maz-radio.md +3 -3
- package/docs/src/components/maz-read-more.md +7 -7
- package/docs/src/components/maz-select-country.md +26 -26
- package/docs/src/components/maz-select.md +1 -1
- package/docs/src/components/maz-skeleton.md +25 -25
- package/docs/src/components/maz-spinner.md +2 -2
- package/docs/src/components/maz-stepper.md +5 -5
- package/docs/src/components/maz-switch.md +1 -1
- package/docs/src/components/maz-table.md +10 -10
- package/docs/src/components/maz-tabs.md +17 -17
- package/docs/src/components/maz-textarea.md +8 -8
- package/docs/src/components/maz-ticker.md +37 -37
- package/docs/src/components/maz-timeline.md +9 -9
- package/docs/src/composables/use-dialog.md +1 -1
- package/docs/src/composables/use-display-names.md +2 -2
- package/docs/src/composables/use-form-validator.md +35 -35
- package/docs/src/composables/use-idle-timeout.md +3 -3
- package/docs/src/composables/use-reading-time.md +5 -5
- package/docs/src/composables/use-string-matching.md +4 -4
- package/docs/src/composables/use-swipe.md +3 -3
- package/docs/src/composables/use-timer.md +3 -3
- package/docs/src/composables/use-toast.md +1 -1
- package/docs/src/composables/use-user-visibility.md +1 -1
- package/docs/src/composables/use-wait.md +2 -2
- package/docs/src/directives/click-outside.md +17 -17
- package/docs/src/directives/lazy-img.md +5 -5
- package/docs/src/directives/tooltip.md +15 -15
- package/docs/src/directives/zoom-img.md +1 -1
- package/docs/src/ecosystem/eslint-config.md +100 -0
- package/docs/src/ecosystem/stylelint-config.md +190 -0
- package/docs/src/guide/browser-support.md +81 -0
- package/docs/src/guide/getting-started.md +23 -16
- package/docs/src/guide/icon-set.md +11 -11
- package/docs/src/guide/icons.md +32 -5
- package/docs/src/guide/maz-ui-provider.md +6 -6
- package/docs/src/guide/migration-v4.md +3 -3
- package/docs/src/guide/migration-v5.md +662 -0
- package/docs/src/guide/nuxt.md +27 -44
- package/docs/src/guide/resolvers.md +2 -2
- package/docs/src/guide/tailwind.md +154 -0
- package/docs/src/guide/themes.md +258 -485
- package/docs/src/guide/vue.md +8 -5
- package/docs/src/helpers/capitalize.md +4 -4
- package/docs/src/helpers/country-code-to-unicode-flag.md +37 -37
- package/docs/src/helpers/currency.md +4 -4
- package/docs/src/helpers/date.md +4 -4
- package/docs/src/helpers/get-country-flag-url.md +9 -9
- package/docs/src/helpers/number.md +5 -5
- package/docs/src/index.md +296 -266
- package/docs/src/made-with-maz-ui.md +5 -5
- package/docs/src/plugins/aos.md +6 -6
- package/docs/src/plugins/dialog.md +4 -4
- package/docs/src/plugins/toast.md +3 -3
- package/docs/src/plugins/wait.md +1 -1
- package/package.json +5 -5
package/docs/src/guide/nuxt.md
CHANGED
|
@@ -20,7 +20,7 @@ Check out the documentation of [@maz-ui/mcp](./mcp.md)
|
|
|
20
20
|
- **Zero Configuration** - Works out of the box with sensible defaults
|
|
21
21
|
- **Advanced Theming** - Built-in dark mode, custom themes, and CSS variables
|
|
22
22
|
- **Auto-Import Everything** - Components, composables, and directives automatically available
|
|
23
|
-
- **Performance Optimized** - Tree-shaking, lazy loading, and
|
|
23
|
+
- **Performance Optimized** - Tree-shaking, lazy loading, and SSR-friendly CSS injection
|
|
24
24
|
- **Developer Experience** - TypeScript support, DevTools integration, and IntelliSense
|
|
25
25
|
- **Production Ready** - SSR/SSG support with client-side hydration
|
|
26
26
|
|
|
@@ -75,7 +75,7 @@ const { toggleDarkMode, isDark } = useTheme()
|
|
|
75
75
|
</script>
|
|
76
76
|
|
|
77
77
|
<template>
|
|
78
|
-
<div class="maz
|
|
78
|
+
<div class="maz:bg-surface p-8 maz:text-foreground">
|
|
79
79
|
<!-- Components are auto-imported -->
|
|
80
80
|
<MazBtn color="primary" @click="start">
|
|
81
81
|
Start timer ({{ remainingTime }}ms)
|
|
@@ -119,13 +119,13 @@ export default defineNuxtConfig({
|
|
|
119
119
|
|
|
120
120
|
// CSS & Styling
|
|
121
121
|
css: {
|
|
122
|
-
|
|
122
|
+
injectCss: true, // Auto-inject Maz-UI styles
|
|
123
123
|
},
|
|
124
124
|
|
|
125
125
|
// Theming System
|
|
126
126
|
theme: {
|
|
127
|
-
preset: 'maz-ui', // 'maz-ui' | '
|
|
128
|
-
strategy: '
|
|
127
|
+
preset: 'maz-ui', // 'maz-ui' | 'pristine' | 'ocean' | 'obsidian' | 'nova' | custom object
|
|
128
|
+
strategy: 'runtime', // 'runtime' | 'buildtime'
|
|
129
129
|
darkModeStrategy: 'class', // 'class' | 'media' | 'auto'
|
|
130
130
|
overrides: {
|
|
131
131
|
colors: {
|
|
@@ -190,7 +190,7 @@ const general = {
|
|
|
190
190
|
// Add prefix to all auto-imported composables
|
|
191
191
|
autoImportPrefix: 'Maz', // only for composables, generates useMazToast, useMazTheme, etc.
|
|
192
192
|
|
|
193
|
-
// Default icon path for <MazIcon
|
|
193
|
+
// Default icon path for <MazIcon icon="..." />
|
|
194
194
|
defaultMazIconPath: '/icons',
|
|
195
195
|
|
|
196
196
|
// Enable Nuxt DevTools integration
|
|
@@ -203,7 +203,7 @@ const general = {
|
|
|
203
203
|
```ts
|
|
204
204
|
const css = {
|
|
205
205
|
// Auto-inject Maz-UI base styles
|
|
206
|
-
|
|
206
|
+
injectCss: true,
|
|
207
207
|
}
|
|
208
208
|
```
|
|
209
209
|
|
|
@@ -222,13 +222,13 @@ const theme = {
|
|
|
222
222
|
light: {
|
|
223
223
|
primary: '220 100% 50%',
|
|
224
224
|
secondary: '220 14% 96%',
|
|
225
|
-
|
|
225
|
+
surface: '0 0% 100%',
|
|
226
226
|
foreground: '222 84% 5%',
|
|
227
227
|
},
|
|
228
228
|
dark: {
|
|
229
229
|
primary: '220 100% 70%',
|
|
230
230
|
secondary: '220 14% 4%',
|
|
231
|
-
|
|
231
|
+
surface: '222 84% 5%',
|
|
232
232
|
foreground: '210 40% 98%',
|
|
233
233
|
}
|
|
234
234
|
},
|
|
@@ -242,46 +242,32 @@ const theme = {
|
|
|
242
242
|
colorMode: 'auto', // 'light' | 'dark' | 'auto'
|
|
243
243
|
|
|
244
244
|
// CSS generation strategy
|
|
245
|
-
strategy: '
|
|
245
|
+
strategy: 'runtime', // 'runtime' (recommended) | 'buildtime'
|
|
246
246
|
|
|
247
247
|
// Dark mode handling
|
|
248
248
|
darkModeStrategy: 'class', // 'class' | 'media' | 'auto'
|
|
249
|
+
|
|
250
|
+
// Persist the active preset name in the `maz-preset` cookie so the
|
|
251
|
+
// user's last-used theme is restored on reload. Default: true.
|
|
252
|
+
persistPreset: true,
|
|
249
253
|
}
|
|
250
254
|
```
|
|
251
255
|
|
|
252
256
|
## Theme Strategies Explained
|
|
253
257
|
|
|
254
|
-
###
|
|
255
|
-
|
|
256
|
-
The hybrid strategy combines optimal performance with zero FOUC (Flash of Unstyled Content):
|
|
257
|
-
|
|
258
|
-
- **Critical CSS injected immediately** - Essential theme variables are inlined on server side to prevent visual flash (on client side if SSR is not enabled)
|
|
259
|
-
- **Full CSS loaded asynchronously** - Complete theme CSS is injected on client side using `requestIdleCallback` with 100ms timeout, avoiding main thread blocking
|
|
260
|
-
- **SSR-optimized** - When SSR is enabled, critical CSS is inlined during server rendering for instant theming
|
|
261
|
-
|
|
262
|
-
```ts
|
|
263
|
-
export default defineNuxtConfig({
|
|
264
|
-
mazUi: {
|
|
265
|
-
theme: {
|
|
266
|
-
strategy: 'hybrid' // Recommended for most use cases
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
})
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
### Runtime
|
|
258
|
+
### Runtime (Recommended)
|
|
273
259
|
|
|
274
|
-
|
|
260
|
+
The full theme CSS is generated and injected synchronously on first paint:
|
|
275
261
|
|
|
276
|
-
- **
|
|
277
|
-
- **
|
|
278
|
-
-
|
|
262
|
+
- **No FOUC** - The full stylesheet is rendered in the document head before the first paint
|
|
263
|
+
- **SSR-friendly** - On Nuxt SSR, the CSS is inlined via `useHead` during server rendering and re-used on the client
|
|
264
|
+
- **Dynamic** - `useTheme().updateTheme(...)` re-injects the new CSS on the fly
|
|
279
265
|
|
|
280
266
|
```ts
|
|
281
267
|
export default defineNuxtConfig({
|
|
282
268
|
mazUi: {
|
|
283
269
|
theme: {
|
|
284
|
-
strategy: 'runtime' //
|
|
270
|
+
strategy: 'runtime' // Recommended for most use cases
|
|
285
271
|
}
|
|
286
272
|
}
|
|
287
273
|
})
|
|
@@ -306,12 +292,6 @@ export default defineNuxtConfig({
|
|
|
306
292
|
})
|
|
307
293
|
```
|
|
308
294
|
|
|
309
|
-
::: info SSR Behavior
|
|
310
|
-
The behavior of `hybrid` and `runtime` strategies depends on your Nuxt SSR configuration:
|
|
311
|
-
- **With SSR**: Critical CSS is injected during server rendering, full CSS handled on client
|
|
312
|
-
- **SPA mode**: All CSS injection happens on client-side as described in the [themes documentation](/guide/themes#rendering-strategies)
|
|
313
|
-
:::
|
|
314
|
-
|
|
315
295
|
### Components
|
|
316
296
|
|
|
317
297
|
```ts
|
|
@@ -403,14 +383,17 @@ export const customTheme = definePreset({
|
|
|
403
383
|
foundation: {
|
|
404
384
|
'base-font-size': '14px',
|
|
405
385
|
'font-family': `Manrope, sans-serif, system-ui, -apple-system`,
|
|
406
|
-
'
|
|
386
|
+
'space': '0.25rem',
|
|
407
387
|
'border-width': '0.0625rem',
|
|
408
388
|
},
|
|
389
|
+
scales: {
|
|
390
|
+
rounded: { md: '0.7rem' },
|
|
391
|
+
},
|
|
409
392
|
colors: {
|
|
410
393
|
light: {
|
|
411
394
|
primary: '350 100% 50%', // Custom pink
|
|
412
395
|
secondary: '350 14% 96%',
|
|
413
|
-
|
|
396
|
+
surface: '0 0% 100%',
|
|
414
397
|
foreground: '222 84% 5%',
|
|
415
398
|
muted: '210 40% 96%',
|
|
416
399
|
accent: '210 40% 90%',
|
|
@@ -422,7 +405,7 @@ export const customTheme = definePreset({
|
|
|
422
405
|
dark: {
|
|
423
406
|
primary: '350 100% 70%',
|
|
424
407
|
secondary: '350 14% 4%',
|
|
425
|
-
|
|
408
|
+
surface: '222 84% 5%',
|
|
426
409
|
foreground: '210 40% 98%',
|
|
427
410
|
muted: '217 33% 17%',
|
|
428
411
|
accent: '217 33% 17%',
|
|
@@ -439,7 +422,7 @@ export default defineNuxtConfig({
|
|
|
439
422
|
mazUi: {
|
|
440
423
|
theme: {
|
|
441
424
|
preset: customTheme,
|
|
442
|
-
strategy: '
|
|
425
|
+
strategy: 'runtime',
|
|
443
426
|
}
|
|
444
427
|
}
|
|
445
428
|
})
|
|
@@ -450,7 +450,7 @@ function saveUser() {
|
|
|
450
450
|
size="sm"
|
|
451
451
|
@click="refreshData"
|
|
452
452
|
>
|
|
453
|
-
<MazIcon
|
|
453
|
+
<MazIcon icon="/refresh.svg" />
|
|
454
454
|
</MazBtn>
|
|
455
455
|
</div>
|
|
456
456
|
</template>
|
|
@@ -626,7 +626,7 @@ MazComponentsResolver({
|
|
|
626
626
|
|
|
627
627
|
```vue
|
|
628
628
|
<script setup lang="ts">
|
|
629
|
-
import { formatCurrency, debounce } from 'maz-ui'
|
|
629
|
+
import { formatCurrency, debounce } from '@maz-ui/utils'
|
|
630
630
|
import { MazBtn, MazCard, MazInput } from 'maz-ui/components'
|
|
631
631
|
import { useTheme, useToast } from 'maz-ui/composables'
|
|
632
632
|
import { vTooltip } from 'maz-ui/directives'
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tailwind CSS integration (optional)
|
|
3
|
+
description: Expose your active maz-ui theme tokens to your own Tailwind v4 setup
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# {{ $frontmatter.title }}
|
|
7
|
+
|
|
8
|
+
::: tip This page is optional
|
|
9
|
+
Maz-UI works without Tailwind. You install the package, import `maz-ui/style.css`, and components render with the preset you chose — nothing else is required.
|
|
10
|
+
|
|
11
|
+
This page is for consumers who **already have a Tailwind v4 setup of their own** and want their own utilities (`bg-primary`, `rounded-md`, `tab-m:flex`, …) to pull from the active maz-ui theme.
|
|
12
|
+
:::
|
|
13
|
+
|
|
14
|
+
## Setup
|
|
15
|
+
|
|
16
|
+
In your Tailwind entry, add **one import** under `@import "tailwindcss"`:
|
|
17
|
+
|
|
18
|
+
```css
|
|
19
|
+
/* src/tailwind.css (or wherever your Tailwind entry lives) */
|
|
20
|
+
@import "tailwindcss";
|
|
21
|
+
@import "maz-ui/tailwindcss/theme.css";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
That's it. Your Tailwind utilities now resolve to the currently-active maz-ui theme. Switch presets at runtime via `useTheme().updateTheme()` and every utility reflows automatically — no rebuild.
|
|
25
|
+
|
|
26
|
+
**Prerequisites:** `tailwindcss@^4.2`, `@tailwindcss/vite` or `@tailwindcss/postcss`, and `@maz-ui/themes` initialized in your app.
|
|
27
|
+
|
|
28
|
+
## What you get
|
|
29
|
+
|
|
30
|
+
### Brand & state colors
|
|
31
|
+
|
|
32
|
+
Each one comes with `bg-X`, `text-X`, `border-X`, an 11-step scale (`bg-X-50` → `bg-X-950`), and a paired foreground (`text-X-foreground`) suitable for text on top of that color.
|
|
33
|
+
|
|
34
|
+
| Color | Use case |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| `primary` | brand primary |
|
|
37
|
+
| `secondary` | brand secondary |
|
|
38
|
+
| `accent` | brand accent |
|
|
39
|
+
| `success` | success state |
|
|
40
|
+
| `warning` | warning state |
|
|
41
|
+
| `destructive` | error / danger state |
|
|
42
|
+
| `info` | informational state |
|
|
43
|
+
| `contrast` | neutral high-contrast surface (text/dark UI) |
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<div class="bg-primary text-primary-foreground p-4">Hello</div>
|
|
47
|
+
<div class="bg-success-100 text-success-700">Saved!</div>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Neutral & surface colors
|
|
51
|
+
|
|
52
|
+
These don't have a foreground variant — they're typically used for backgrounds, text, borders or overlays directly. Each one still ships an 11-step scale.
|
|
53
|
+
|
|
54
|
+
| Color | Use case |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `surface` | page / container backgrounds |
|
|
57
|
+
| `foreground` | body text |
|
|
58
|
+
| `divider` | borders, separators |
|
|
59
|
+
| `muted` | secondary text, placeholders |
|
|
60
|
+
| `overlay` | modal backdrops, scrims |
|
|
61
|
+
| `shadow` | shadow tint (used by `shadow-*` utilities) |
|
|
62
|
+
|
|
63
|
+
```html
|
|
64
|
+
<p class="text-foreground">Body text</p>
|
|
65
|
+
<p class="text-muted">Secondary text</p>
|
|
66
|
+
<hr class="border-divider" />
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Per-component surfaces
|
|
70
|
+
|
|
71
|
+
Two extra background tokens that follow the active preset's `components` block — useful when your custom components want to match the look of `MazContainer` / `MazInput`:
|
|
72
|
+
|
|
73
|
+
- `bg-container` — same as `MazContainer`'s background
|
|
74
|
+
- `bg-input` — same as `MazInput`'s background (different in dark mode by default)
|
|
75
|
+
|
|
76
|
+
### Spacing
|
|
77
|
+
|
|
78
|
+
`--spacing` is sourced from the preset's `foundation.space` (default `0.25rem`), so every Tailwind spacing utility (`p-1`, `gap-2`, `w-4`, …) rescales when the preset changes.
|
|
79
|
+
|
|
80
|
+
### Radius
|
|
81
|
+
|
|
82
|
+
The whole `rounded-*` scale is preset-controlled via `scales.rounded`:
|
|
83
|
+
|
|
84
|
+
| Class | Source |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| `rounded-xs` … `rounded-3xl` | `var(--maz-rounded-{xs..3xl})` |
|
|
87
|
+
|
|
88
|
+
### Shadows
|
|
89
|
+
|
|
90
|
+
| Class | Use case |
|
|
91
|
+
| --- | --- |
|
|
92
|
+
| `shadow-sm`, `shadow-md`, `shadow-lg`, `shadow-xl` | standard scale (preset-controlled) |
|
|
93
|
+
| `shadow-elevation` | elevated surfaces — cards, popovers |
|
|
94
|
+
|
|
95
|
+
### Breakpoints
|
|
96
|
+
|
|
97
|
+
Added **on top of** Tailwind's defaults (`sm`/`md`/`lg`/`xl`/`2xl` still work):
|
|
98
|
+
|
|
99
|
+
| Variant | Min-width |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| `mob-s:` | 320px |
|
|
102
|
+
| `mob-m:` | 425px |
|
|
103
|
+
| `mob-l:` | 576px |
|
|
104
|
+
| `tab-s:` | 640px |
|
|
105
|
+
| `tab-m:` | 768px |
|
|
106
|
+
| `tab-l:` | 992px |
|
|
107
|
+
| `lap-s:` | 1024px |
|
|
108
|
+
| `lap-m:` | 1280px |
|
|
109
|
+
| `lap-l:` | 1366px |
|
|
110
|
+
| `lap-xl:` | 1440px |
|
|
111
|
+
| `lap-2xl:` | 1680px |
|
|
112
|
+
| `lap-3xl:` | 1920px |
|
|
113
|
+
|
|
114
|
+
### Typography
|
|
115
|
+
|
|
116
|
+
| Class | Source |
|
|
117
|
+
| --- | --- |
|
|
118
|
+
| `font-sans` | `var(--maz-font-family)` |
|
|
119
|
+
| `font-mono` | `var(--maz-font-mono-stack)` |
|
|
120
|
+
| `font-display` | `var(--maz-font-display-stack)` |
|
|
121
|
+
|
|
122
|
+
Default border width and the default transition duration also follow the preset (`var(--maz-border-width)`, `var(--maz-motion-normal)`).
|
|
123
|
+
|
|
124
|
+
## Using `@apply` inside Vue SFC `<style>` blocks
|
|
125
|
+
|
|
126
|
+
Tailwind v4's Vite plugin processes each SFC `<style>` block in isolation. If your SFCs use `@apply`, the block must start with a `@reference` directive pointing at your Tailwind entry:
|
|
127
|
+
|
|
128
|
+
```vue
|
|
129
|
+
<style scoped>
|
|
130
|
+
@reference "../tailwind.css";
|
|
131
|
+
|
|
132
|
+
.card {
|
|
133
|
+
@apply flex gap-4 rounded-md bg-surface p-4 shadow-elevation;
|
|
134
|
+
}
|
|
135
|
+
</style>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
One line per SFC. Maz-ui components already ship this internally.
|
|
139
|
+
|
|
140
|
+
## Migrating from Tailwind v3
|
|
141
|
+
|
|
142
|
+
If your app was on Tailwind v3, run the official Tailwind upgrade tool first — it handles 95% of the v3 → v4 transition (utility renames, `@apply !important` syntax, `tailwind.config.js` → CSS-first):
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
npx @tailwindcss/upgrade
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Then apply the maz-ui-specific changes from the [v4 → v5 migration guide](./migration-v5.md#advanced-you-had-your-own-tailwind-setup).
|
|
149
|
+
|
|
150
|
+
## See also
|
|
151
|
+
|
|
152
|
+
- [Theming](./themes.md) — create a custom preset, switch themes at runtime
|
|
153
|
+
- [Migration v4 → v5](./migration-v5.md) — library-level changes
|
|
154
|
+
- [Browser Support](./browser-support.md) — exact minimum versions required by Tailwind v4
|