@maz-ui/mcp 5.1.0-beta.0 → 5.1.0-beta.1

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.
Files changed (57) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.mjs +3 -1
  3. package/dist/index.d.mts +11 -6
  4. package/dist/index.d.ts +11 -6
  5. package/dist/index.mjs +3 -1
  6. package/dist/shared/{mcp.DzqVbCaL.mjs → mcp.DseFuKdl.mjs} +696 -74
  7. package/docs/README.md +37 -37
  8. package/docs/agents/agents-md.md +4 -4
  9. package/docs/agents/claude-rule.md +4 -4
  10. package/docs/components/maz-accordion.md +2 -0
  11. package/docs/components/maz-btn-group.md +1 -0
  12. package/docs/components/maz-btn.md +3 -1
  13. package/docs/components/maz-card-spotlight.md +2 -2
  14. package/docs/components/maz-circular-progress-bar.md +2 -2
  15. package/docs/components/maz-drawer.md +3 -2
  16. package/docs/components/maz-fullscreen-loader.md +2 -2
  17. package/docs/components/maz-loading-bar.md +2 -2
  18. package/docs/components/maz-pagination.md +2 -2
  19. package/docs/components/maz-radio.md +2 -2
  20. package/docs/components/maz-sidebar-content.md +2 -2
  21. package/docs/components/maz-sidebar-footer.md +2 -2
  22. package/docs/components/maz-sidebar-group.md +2 -2
  23. package/docs/components/maz-sidebar-header.md +2 -2
  24. package/docs/components/maz-sidebar-menu-button.md +2 -2
  25. package/docs/components/maz-sidebar-menu-item.md +2 -2
  26. package/docs/components/maz-sidebar-menu-sub.md +2 -2
  27. package/docs/components/maz-sidebar-menu.md +2 -2
  28. package/docs/components/maz-sidebar-separator.md +2 -2
  29. package/docs/components/maz-sidebar-trigger.md +2 -2
  30. package/docs/components/maz-spinner.md +2 -2
  31. package/docs/components/maz-stepper.md +5 -0
  32. package/docs/components/maz-table-cell.md +2 -2
  33. package/docs/components/maz-table-row.md +2 -2
  34. package/docs/components/maz-table-title.md +2 -2
  35. package/docs/components/maz-table-virtualizer.md +2 -2
  36. package/docs/components/maz-tabs-bar.md +2 -2
  37. package/docs/components/maz-tabs-content-item.md +2 -2
  38. package/docs/components/maz-tabs-content.md +2 -2
  39. package/docs/components/maz-ui-provider.md +2 -2
  40. package/docs/composables/use-aos.md +2 -2
  41. package/docs/composables/use-breakpoints.md +2 -2
  42. package/docs/composables/use-toast.md +2 -2
  43. package/docs/composables/use-user-visibility.md +4 -4
  44. package/docs/composables/use-wait.md +2 -2
  45. package/docs/directives/fullscreen-img.md +4 -4
  46. package/docs/ecosystem/icons/icon-set.md +4 -4
  47. package/docs/ecosystem/icons/index.md +4 -4
  48. package/docs/ecosystem/mcp.md +1 -1
  49. package/docs/ecosystem/nuxt.md +5 -1
  50. package/docs/ecosystem/translations.md +2 -2
  51. package/docs/ecosystem/utils/country-code-to-unicode-flag.md +2 -2
  52. package/docs/guide/ai-agents.md +6 -4
  53. package/docs/guide/tailwind.md +25 -1
  54. package/docs/manifest.json +1 -1
  55. package/docs/reference/tailwind-tokens.md +1 -1
  56. package/docs/rules.md +5 -3
  57. package/package.json +4 -2
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "MazTableTitle"
3
- description: "MazTableTitle is a building block of MazTable."
3
+ description: "Header cell of MazTable, when you write the header by hand."
4
4
  package: "maz-ui"
5
5
  ---
6
6
 
7
7
  # MazTableTitle
8
8
 
9
- > MazTableTitle is a building block of MazTable.
9
+ > Header cell of MazTable, when you write the header by hand.
10
10
 
11
11
  - Package: `maz-ui`
12
12
  - Import: `import MazTableTitle from 'maz-ui/components/MazTableTitle'`
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "MazTableVirtualizer"
3
- description: "MazTableVirtualizer component."
3
+ description: "Renderless provider loaded on demand by MazTable to virtualize long lists of rows."
4
4
  package: "maz-ui"
5
5
  ---
6
6
 
7
7
  # MazTableVirtualizer
8
8
 
9
- > MazTableVirtualizer component.
9
+ > Renderless provider loaded on demand by MazTable to virtualize long lists of rows.
10
10
 
11
11
  - Package: `maz-ui`
12
12
  - Import: `import MazTableVirtualizer from 'maz-ui/components/MazTableVirtualizer'`
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "MazTabsBar"
3
- description: "MazTabsBar is a building block of MazTabs."
3
+ description: "Bar of tab buttons of MazTabs."
4
4
  package: "maz-ui"
5
5
  ---
6
6
 
7
7
  # MazTabsBar
8
8
 
9
- > MazTabsBar is a building block of MazTabs.
9
+ > Bar of tab buttons of MazTabs.
10
10
 
11
11
  - Package: `maz-ui`
12
12
  - Import: `import MazTabsBar from 'maz-ui/components/MazTabsBar'`
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "MazTabsContentItem"
3
- description: "MazTabsContentItem is a building block of MazTabs."
3
+ description: "Panel of MazTabs displayed when its tab is active."
4
4
  package: "maz-ui"
5
5
  ---
6
6
 
7
7
  # MazTabsContentItem
8
8
 
9
- > MazTabsContentItem is a building block of MazTabs.
9
+ > Panel of MazTabs displayed when its tab is active.
10
10
 
11
11
  - Package: `maz-ui`
12
12
  - Import: `import MazTabsContentItem from 'maz-ui/components/MazTabsContentItem'`
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "MazTabsContent"
3
- description: "MazTabsContent is a building block of MazTabs."
3
+ description: "Container of the tab panels of MazTabs."
4
4
  package: "maz-ui"
5
5
  ---
6
6
 
7
7
  # MazTabsContent
8
8
 
9
- > MazTabsContent is a building block of MazTabs.
9
+ > Container of the tab panels of MazTabs.
10
10
 
11
11
  - Package: `maz-ui`
12
12
  - Import: `import MazTabsContent from 'maz-ui/components/MazTabsContent'`
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "MazUiProvider"
3
- description: "MazUiProvider component."
3
+ description: "Component alternative to the MazUi plugin: provides the theme, the translations and the default props of maz-ui to its subtree (lazy loaded pages, scoped themes)."
4
4
  package: "maz-ui"
5
5
  ---
6
6
 
7
7
  # MazUiProvider
8
8
 
9
- > MazUiProvider component.
9
+ > Component alternative to the MazUi plugin: provides the theme, the translations and the default props of maz-ui to its subtree (lazy loaded pages, scoped themes).
10
10
 
11
11
  - Package: `maz-ui`
12
12
  - Import: `import MazUiProvider from 'maz-ui/components/MazUiProvider'`
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  title: "useAos"
3
- description: "Vue composable for handling aos plugin in your components"
3
+ description: "Vue composable to access the AOS plugin instance (animations on scroll) in your components, to refresh or trigger the animations"
4
4
  package: "maz-ui"
5
5
  url: "https://maz-ui.com/composables/use-aos"
6
6
  ---
7
7
 
8
8
  # useAos
9
9
 
10
- > Vue composable for handling aos plugin in your components
10
+ > Vue composable to access the AOS plugin instance (animations on scroll) in your components, to refresh or trigger the animations
11
11
 
12
12
  - Package: `maz-ui`
13
13
  - Import: `import { useAos } from 'maz-ui/composables/useAos'`
@@ -1,11 +1,11 @@
1
1
  ---
2
- title: "useWindowSize"
2
+ title: "useBreakpoints"
3
3
  description: "This composable extends the functionality of the useWindowSize composable to manage responsive breakpoints"
4
4
  package: "maz-ui"
5
5
  url: "https://maz-ui.com/composables/use-breakpoints"
6
6
  ---
7
7
 
8
- # useWindowSize
8
+ # useBreakpoints
9
9
 
10
10
  > This composable extends the functionality of the useWindowSize composable to manage responsive breakpoints
11
11
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  title: "useToast"
3
- description: "Vue composable for handling toast plugin in your components"
3
+ description: "Vue composable to display toast notifications (info, success, warning, error, with actions and buttons) from your components, through the toast plugin"
4
4
  package: "maz-ui"
5
5
  url: "https://maz-ui.com/composables/use-toast"
6
6
  ---
7
7
 
8
8
  # useToast
9
9
 
10
- > Vue composable for handling toast plugin in your components
10
+ > Vue composable to display toast notifications (info, success, warning, error, with actions and buttons) from your components, through the toast plugin
11
11
 
12
12
  - Package: `maz-ui`
13
13
  - Import: `import { useToast } from 'maz-ui/composables/useToast'`
@@ -1,13 +1,13 @@
1
1
  ---
2
- title: "user-visibility"
3
- description: "Plugin to see and manage the user page visibility"
2
+ title: "useUserVisibility"
3
+ description: "Vue composable to know whether the user is looking at the page (Page Visibility API), with an optional delay before considering them away"
4
4
  package: "maz-ui"
5
5
  url: "https://maz-ui.com/composables/use-user-visibility"
6
6
  ---
7
7
 
8
- # user-visibility
8
+ # useUserVisibility
9
9
 
10
- > Plugin to see and manage the user page visibility
10
+ > Vue composable to know whether the user is looking at the page (Page Visibility API), with an optional delay before considering them away
11
11
 
12
12
  - Package: `maz-ui`
13
13
  - Import: `import { useUserVisibility } from 'maz-ui/composables/useUserVisibility'`
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  title: "useWait"
3
- description: "Vue composable for handling wait plugins"
3
+ description: "Vue composable to manage loading states (start, stop, check) in your components, through the wait plugin and the MazFullscreenLoader"
4
4
  package: "maz-ui"
5
5
  url: "https://maz-ui.com/composables/use-wait"
6
6
  ---
7
7
 
8
8
  # useWait
9
9
 
10
- > Vue composable for handling wait plugins
10
+ > Vue composable to manage loading states (start, stop, check) in your components, through the wait plugin and the MazFullscreenLoader
11
11
 
12
12
  - Package: `maz-ui`
13
13
  - Import: `import { useWait } from 'maz-ui/composables/useWait'`
@@ -1,13 +1,13 @@
1
1
  ---
2
- title: "v-fullscreen-img"
3
- description: "Displays images fullscreen on click"
2
+ title: "vFullscreenImg"
3
+ description: "vFullscreenImg is a Vue directive that opens an image in fullscreen on click, with zoom and navigation between the images of a group"
4
4
  package: "maz-ui"
5
5
  url: "https://maz-ui.com/directives/fullscreen-img"
6
6
  ---
7
7
 
8
- # v-fullscreen-img
8
+ # vFullscreenImg
9
9
 
10
- > Displays images fullscreen on click
10
+ > vFullscreenImg is a Vue directive that opens an image in fullscreen on click, with zoom and navigation between the images of a group
11
11
 
12
12
  - Package: `maz-ui`
13
13
  - Import: `import { vFullscreenImg } from 'maz-ui/directives/vFullscreenImg'`
@@ -1,13 +1,13 @@
1
1
  ---
2
- title: "IconSet"
3
- description: ""
2
+ title: "Icon Set"
3
+ description: "Search and copy the 860+ icons of @maz-ui/icons, with the naming convention and the static, lazy and raw imports of each icon"
4
4
  package: "@maz-ui/icons"
5
5
  url: "https://maz-ui.com/ecosystem/icons/icon-set"
6
6
  ---
7
7
 
8
- # IconSet
8
+ # Icon Set
9
9
 
10
- >
10
+ > Search and copy the 860+ icons of @maz-ui/icons, with the naming convention and the static, lazy and raw imports of each icon
11
11
 
12
12
  - Package: `@maz-ui/icons`
13
13
  - Web: https://maz-ui.com/ecosystem/icons/icon-set
@@ -1,13 +1,13 @@
1
1
  ---
2
- title: "Icons"
3
- description: ""
2
+ title: "@maz-ui/icons"
3
+ description: "The @maz-ui/icons package provides 860+ SVG icons (interface icons, brand logos, country flags) as tree-shakable Vue components, lazy components or raw SVG strings"
4
4
  package: "@maz-ui/icons"
5
5
  url: "https://maz-ui.com/ecosystem/icons/"
6
6
  ---
7
7
 
8
- # Icons
8
+ # @maz-ui/icons
9
9
 
10
- >
10
+ > The @maz-ui/icons package provides 860+ SVG icons (interface icons, brand logos, country flags) as tree-shakable Vue components, lazy components or raw SVG strings
11
11
 
12
12
  - Package: `@maz-ui/icons`
13
13
  - Import: `import { MazCheck } from '@maz-ui/icons/static/MazCheck'` or `import { MazIconsResolver } from '@maz-ui/icons/resolvers'`
@@ -23,7 +23,7 @@ It registers the server and writes the maz-ui rules for the agents of your proje
23
23
  | `search_docs` | Find what maz-ui provides for a need, described in plain words ("user avatar with initials", "confirm before delete", "debounce search") or by name. Understands the vocabulary of other libraries ("modal", "snackbar", "combobox") |
24
24
  | `get_component_api` | Exact API of up to 10 components: props with types, defaults and accepted values, `v-model`, events with payload, slots with bindings, exposed methods |
25
25
  | `find_icons` | Icons of `@maz-ui/icons` by meaning ("delete", "settings", "france flag") with their imports |
26
- | `get_theme_tokens` | Every Tailwind class and CSS variable of the maz-ui theme: colors, radius, shadows, spacing, breakpoints, fonts, z-index, utilities |
26
+ | `get_theme_tokens` | The theme of your project (preset values, `@theme` tokens, variants, utilities, read from your files) and every Tailwind class and CSS variable of the maz-ui theme: colors, radius, shadows, spacing, breakpoints, fonts, z-index, utilities |
27
27
  | `get_doc` | Any documentation page by id or name (`components/maz-btn`, `useToast`, `guide/tailwind`), whole or by sections |
28
28
  | `list_docs` | Catalog of the components, composables, directives, plugins, helpers, packages and guides |
29
29
  | `get_setup_guide` | Installation steps for Vue or Nuxt, with or without Tailwind |
@@ -447,17 +447,21 @@ const agents = {
447
447
  rules: false,
448
448
  // 'claude' | 'agents-md' | 'cursor' | 'vscode' (default: the detected agents)
449
449
  targets: ['claude', 'agents-md'],
450
+ // Folder where the files are written, relative to the Nuxt app (default: the root of the workspace)
451
+ dir: '../..',
450
452
  }
451
453
  // agents: true enables mcp and rules, agents: false disables everything
452
454
  ```
453
455
 
456
+ In a monorepo, the files are written at the **root of the workspace** (`workspaceDir` of Nuxt), where your agents start, not in the Nuxt app: a single `.mcp.json` serves every app. Set `dir` to choose another folder.
457
+
454
458
  The module runs in development only (never in CI nor in tests), only for the agents it detects in the project (`.claude/`, `CLAUDE.md`, `.mcp.json`, `.cursor/`, `.vscode/mcp.json`, `.github/copilot-instructions.md`, `AGENTS.md`, `.codex/`, `.windsurf/`...), and keeps the files up to date when you upgrade maz-ui:
455
459
 
456
460
  - `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json`: a `maz-ui` server entry, added only when no maz-ui MCP server is already registered
457
461
  - with `rules: true`, `.claude/rules/maz-ui.md`: a Claude Code rule (skipped when Claude reads `AGENTS.md`, i.e. without `CLAUDE.md`)
458
462
  - with `rules: true`, `AGENTS.md`: a section delimited by `<!-- BEGIN:maz-ui -->` and `<!-- END:maz-ui -->`, read by Codex, Cursor, Copilot, Windsurf...
459
463
 
460
- It never overwrites a file it does not own: your `CLAUDE.md`, your own rules and the other MCP servers are left untouched. Commit the generated files to share them with your team. See the [AI agents guide](../guide/ai-agents.md) for details.
464
+ It never overwrites a file it does not own: your `CLAUDE.md`, your own rules and the other MCP servers are left untouched, and an existing `maz-ui` server entry (for example pinned to a version) is kept as is. Commit the generated files to share them with your team (check that `.claude/` is not in your `.gitignore`). See the [AI agents guide](../guide/ai-agents.md) for details.
461
465
 
462
466
  ## Advanced Theming
463
467
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  title: "Translations (i18n)"
3
- description: "Internationalization for Maz-UI components."
3
+ description: "Internationalization of the maz-ui components with @maz-ui/translations: built-in locales, custom messages, lazy loading and runtime locale switching with useTranslations"
4
4
  package: "@maz-ui/translations"
5
5
  url: "https://maz-ui.com/ecosystem/translations"
6
6
  ---
7
7
 
8
8
  # Translations (i18n)
9
9
 
10
- > Internationalization for Maz-UI components.
10
+ > Internationalization of the maz-ui components with @maz-ui/translations: built-in locales, custom messages, lazy loading and runtime locale switching with useTranslations
11
11
 
12
12
  - Package: `@maz-ui/translations`
13
13
  - Import: `import { useTranslations } from '@maz-ui/translations'` or `import { fr } from '@maz-ui/translations'`
@@ -1,11 +1,11 @@
1
1
  ---
2
- title: "country-code-to-unicode-flag"
2
+ title: "countryCodeToUnicodeFlag"
3
3
  description: "Convert country code in unicode flag"
4
4
  package: "@maz-ui/utils"
5
5
  url: "https://maz-ui.com/ecosystem/utils/country-code-to-unicode-flag"
6
6
  ---
7
7
 
8
- # country-code-to-unicode-flag
8
+ # countryCodeToUnicodeFlag
9
9
 
10
10
  > Convert country code in unicode flag
11
11
 
@@ -81,7 +81,7 @@ export default defineNuxtConfig({
81
81
  })
82
82
  ```
83
83
 
84
- It only runs in development (never in CI, in tests or during builds), writes nothing when no agent is detected, keeps the files in sync with the installed maz-ui version and never overwrites files it does not own.
84
+ It only runs in development (never in CI, in tests or during builds), writes nothing when no agent is detected, keeps the files in sync with the installed maz-ui version and never overwrites files it does not own. In a monorepo, it writes at the root of the workspace, where the agents start (`agents.dir` to choose another folder).
85
85
 
86
86
  ### Without any file in the project
87
87
 
@@ -122,7 +122,7 @@ The MCP server gives agents tools that work with the needs they have, and verify
122
122
  | `search_docs` | Find what maz-ui provides for a need ("confirm before delete", "phone input", "debounce search") |
123
123
  | `get_component_api` | Exact props, values, events, slots of up to 10 components |
124
124
  | `find_icons` | Icons by meaning ("delete", "settings", "france flag") with their imports |
125
- | `get_theme_tokens` | Every Tailwind class and CSS variable of the theme |
125
+ | `get_theme_tokens` | The theme of your project (preset, `@theme` tokens, variants, utilities) and every Tailwind class and CSS variable of maz-ui |
126
126
  | `get_doc` | Any page of the docs, or only some sections |
127
127
  | `list_docs` | The whole catalog |
128
128
  | `get_setup_guide` | Installation in a Vue or Nuxt app, with or without Tailwind |
@@ -193,7 +193,7 @@ This project is built with **maz-ui** and its ecosystem (`@maz-ui/themes`, `@maz
193
193
 
194
194
  Before creating a component, composable, helper, icon or style, check what maz-ui offers:
195
195
 
196
- - **MCP server `maz-ui`** (when available): `search_docs` (describe the need: "confirm before delete", "phone input"), `get_component_api` (exact props, events, slots), `find_icons`, `get_theme_tokens` (Tailwind classes), `get_doc`, `review_code`.
196
+ - **MCP server `maz-ui`** (when available): `search_docs` (describe the need: "confirm before delete", "phone input"), `get_component_api` (exact props, events, slots), `find_icons`, `get_theme_tokens` (Tailwind classes of the project and of maz-ui), `get_doc`, `review_code`.
197
197
  - **Version-matched docs** in `node_modules/maz-ui/docs/` (start with `README.md`; in a monorepo, resolve `maz-ui` from the app package). Read the relevant page before using an API.
198
198
 
199
199
  Never guess an API: only use props, events, slots and imports that are documented.
@@ -215,7 +215,9 @@ Use `@maz-ui/utils` and maz-ui composables instead of lodash, VueUse or hand-wri
215
215
 
216
216
  ### Styling with Tailwind
217
217
 
218
- The maz-ui theme is exposed to Tailwind (`@import 'maz-ui/tailwindcss/theme.css'`). Only use its tokens:
218
+ The maz-ui theme is exposed to Tailwind (`@import 'maz-ui/tailwindcss/theme.css'`) and the project usually extends it. Only use theme tokens:
219
+
220
+ - **Project tokens first**: the Tailwind entry of the project (the CSS file that imports `maz-ui/tailwindcss/theme.css`) adds its own `@theme` tokens (fonts, animations, colors...), `@custom-variant` and `@utility`, and the `definePreset` file sets the brand values of the maz-ui tokens. `get_theme_tokens` lists both; without the MCP server, read these files. When a value is missing, add a token to the project `@theme` and use its class instead of an arbitrary value.
219
221
 
220
222
  - Colors: `primary`, `secondary`, `accent`, `info`, `success`, `warning`, `destructive`, `contrast` (each with `-foreground` and `-50` to `-950`), `surface`, `foreground`, `muted`, `divider`, `overlay`, plus `bg-container` and `bg-input`. Example: `bg-surface text-foreground border-divider`, `bg-primary text-primary-foreground`, `text-muted`.
221
223
  - Never use the default Tailwind palette (`bg-blue-500`, `text-gray-600`, `bg-white`, `text-black`) nor hard-coded colors (`#fff`, `rgb()`, `bg-[#...]`). Theme colors already adapt to dark mode: do not add `dark:` color overrides.
@@ -273,6 +273,28 @@ Toggle the mode with `useTheme()` (`toggleDarkMode()`, `setColorMode('dark' | 'l
273
273
 
274
274
  ## Extending the theme
275
275
 
276
+ ### How the layers fit together
277
+
278
+ Your theme is built from three layers, from the most global to the most specific:
279
+
280
+ 1. **The preset** (`definePreset` of `@maz-ui/themes`) gives the **values**: it emits runtime CSS variables (`--maz-primary`, `--maz-font-family`, `--maz-rounded-md`, `--maz-motion-fast`...) for the light and dark modes.
281
+ 2. **The maz-ui theme** (`maz-ui/tailwindcss/theme.css`) gives the **class names**: it maps each Tailwind token to a preset variable (`--color-primary: var(--maz-primary)`, `--font-display: var(--maz-font-display-stack)`). `bg-primary` or `font-display` therefore follow the active preset and color mode, without rebuild.
282
+ 3. **Your Tailwind entry** gives the **project tokens**: everything you declare after the maz-ui imports (`@theme`, `@custom-variant`, `@utility`) adds classes next to the maz-ui ones.
283
+
284
+ | You want | Put it in | You get |
285
+ | --- | --- | --- |
286
+ | Brand colors, fonts, radius, shadows, motion, spacing | the preset (`colors`, `foundation`, `scales`) | the same maz-ui classes with your values, components included |
287
+ | Background of cards and inputs, button font weight | the preset (`components`) | `bg-container`, `bg-input`, `MazBtn` |
288
+ | A color outside the maz-ui roles (chart series, category) | `@theme { --color-* }` | `bg-<name>`, `text-<name>`... |
289
+ | An animation | `@theme { --animate-* }` + `@keyframes` | `animate-<name>` |
290
+ | A variant (short screens, a state) | `@custom-variant` | `<name>:` |
291
+ | A reusable group of declarations | `@utility` | `<name>` |
292
+ | The width of `padded-container` | `--maz-container-max-width` in your base layer | Container width |
293
+
294
+ **Warning: Redefining a maz-ui token**
295
+
296
+ A token you redefine in your `@theme` (`--color-primary`, `--font-sans`, `--radius-md`...) replaces the maz-ui mapping: the class keeps your literal value and **stops following the preset** (preset switch, light and dark values). Change brand values in the preset instead; redefine a token only when you need it, for example to give a literal font name to `@nuxt/fonts` (see Fonts).
297
+
276
298
  ### Brand colors: use a preset
277
299
 
278
300
  Your brand colors, radius, fonts and spacing belong to a theme preset: every maz-ui component **and** every Tailwind utility (`bg-primary`, `rounded-md`, `font-sans`...) then use them, in light and dark modes.
@@ -321,7 +343,7 @@ For a color outside the maz-ui roles (a chart series, a product category), decla
321
343
 
322
344
  ### Fonts
323
345
 
324
- The font utilities read the preset (`foundation.font-family`, `font-display-stack`, `font-mono-stack`). You can also override them in your Tailwind entry, after the maz-ui import:
346
+ The font utilities read the preset: `font-sans` uses `foundation.font-family`, `font-display` uses `font-display-stack` and `font-mono` uses `font-mono-stack`. You can also redefine them in your Tailwind entry, after the maz-ui import (keep the same stacks as the preset, the classes no longer follow it):
325
347
 
326
348
  ```css
327
349
  @theme {
@@ -466,6 +488,8 @@ Tailwind v4 processes each SFC `<style>` block in isolation: a block that uses `
466
488
 
467
489
  Every class and variable of this page is available to AI coding agents, generated from the sources of the installed version: the `get_theme_tokens` tool of the [maz-ui MCP server](../ecosystem/mcp.md), and `node_modules/maz-ui/docs/reference/tailwind-tokens.md`. See [AI agents](./ai-agents.md).
468
490
 
491
+ `get_theme_tokens` also reads **your** theme: the Tailwind entries of the project (CSS files with `@theme`, `@custom-variant`, `@utility` or a `tailwindcss` import) and the `definePreset` calls, in every app of a monorepo. Agents get your preset values, your tokens with their comments (`animate-rise`, `font-display`, `short:`...), the tokens that redefine a maz-ui one and the setup problems (missing maz-ui import). A comment above a token in your `@theme` is a good place to say when to use it.
492
+
469
493
  ## Migrating from Tailwind v3
470
494
 
471
495
  Run the official upgrade tool first, it handles most of the v3 to v4 transition (renamed utilities, `tailwind.config.js` to CSS-first configuration):