@m3ui-vue/m3ui-vue 0.9.0 → 0.9.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 (315) hide show
  1. package/README.md +12 -2
  2. package/dist/API.md +3661 -0
  3. package/dist/MIcon-CaEooCmZ.js.map +1 -1
  4. package/dist/{MTextField-B0wGv1Mx.js → MTextField-pJU1vFaR.js} +3 -3
  5. package/dist/MTextField-pJU1vFaR.js.map +1 -0
  6. package/dist/api.json +1 -0
  7. package/dist/barcode.js.map +1 -1
  8. package/dist/chart.js.map +1 -1
  9. package/dist/code-editor.js +2 -2
  10. package/dist/code-editor.js.map +1 -1
  11. package/dist/components/MAbsolute.vue.d.ts +12 -0
  12. package/dist/components/MAlert.vue.d.ts +4 -0
  13. package/dist/components/MAppBar.vue.d.ts +12 -0
  14. package/dist/components/MAppLayout.vue.d.ts +2 -0
  15. package/dist/components/MAspectRatio.vue.d.ts +1 -0
  16. package/dist/components/MAutocomplete.vue.d.ts +18 -0
  17. package/dist/components/MAvatar.vue.d.ts +3 -0
  18. package/dist/components/MBadge.vue.d.ts +6 -0
  19. package/dist/components/MBar.vue.d.ts +5 -0
  20. package/dist/components/MBarcode.vue.d.ts +9 -0
  21. package/dist/components/MBottomSheet.vue.d.ts +3 -0
  22. package/dist/components/MBox.vue.d.ts +6 -0
  23. package/dist/components/MBreadcrumbs.vue.d.ts +2 -0
  24. package/dist/components/MButton.vue.d.ts +14 -4
  25. package/dist/components/MButtonGroup.vue.d.ts +7 -0
  26. package/dist/components/MCalendar.vue.d.ts +8 -0
  27. package/dist/components/MCard.vue.d.ts +17 -0
  28. package/dist/components/MCarousel.vue.d.ts +7 -1
  29. package/dist/components/MCenter.vue.d.ts +1 -0
  30. package/dist/components/MChart.vue.d.ts +7 -0
  31. package/dist/components/MChatBubble.vue.d.ts +10 -0
  32. package/dist/components/MCheckbox.vue.d.ts +5 -0
  33. package/dist/components/MChip.vue.d.ts +9 -0
  34. package/dist/components/MCircleProgressBar.vue.d.ts +7 -0
  35. package/dist/components/MCodeEditor.vue.d.ts +9 -0
  36. package/dist/components/MColorPicker.vue.d.ts +8 -0
  37. package/dist/components/MColorPickerModal.vue.d.ts +4 -0
  38. package/dist/components/MCommandPalette.vue.d.ts +8 -0
  39. package/dist/components/MConfirmDialog.vue.d.ts +7 -0
  40. package/dist/components/MContainer.vue.d.ts +4 -0
  41. package/dist/components/MContextMenu.vue.d.ts +3 -6
  42. package/dist/components/MCopyButton.vue.d.ts +10 -0
  43. package/dist/components/MDataTable.vue.d.ts +33 -12
  44. package/dist/components/MDatePicker.vue.d.ts +16 -0
  45. package/dist/components/MDatePickerModal.vue.d.ts +9 -0
  46. package/dist/components/MDateRangePicker.vue.d.ts +18 -0
  47. package/dist/components/MDateRangePickerModal.vue.d.ts +9 -0
  48. package/dist/components/MDialog.vue.d.ts +9 -7
  49. package/dist/components/MDivider.vue.d.ts +6 -0
  50. package/dist/components/MDragDropList.vue.d.ts +6 -0
  51. package/dist/components/MEmoji.vue.d.ts +6 -0
  52. package/dist/components/MEmojiButton.vue.d.ts +5 -0
  53. package/dist/components/MEmptyState.vue.d.ts +4 -0
  54. package/dist/components/MExpansionPanel.vue.d.ts +9 -0
  55. package/dist/components/MExportButton.vue.d.ts +8 -0
  56. package/dist/components/MFab.vue.d.ts +9 -0
  57. package/dist/components/MFabMenu.vue.d.ts +14 -0
  58. package/dist/components/MFileUpload.vue.d.ts +8 -0
  59. package/dist/components/MFixed.vue.d.ts +10 -0
  60. package/dist/components/MFlex.vue.d.ts +6 -0
  61. package/dist/components/MFooter.vue.d.ts +11 -0
  62. package/dist/components/MFullscreen.vue.d.ts +2 -0
  63. package/dist/components/MGrid.vue.d.ts +7 -0
  64. package/dist/components/MHotkeys.vue.d.ts +4 -0
  65. package/dist/components/MIcon.vue.d.ts +2 -0
  66. package/dist/components/MIconButton.vue.d.ts +10 -0
  67. package/dist/components/MInfiniteScroll.vue.d.ts +6 -0
  68. package/dist/components/MJsonEditor.vue.d.ts +8 -0
  69. package/dist/components/MJsonViewer.vue.d.ts +4 -0
  70. package/dist/components/MKanban.vue.d.ts +2 -0
  71. package/dist/components/MKbd.vue.d.ts +2 -0
  72. package/dist/components/MLightbox.vue.d.ts +4 -0
  73. package/dist/components/MList.vue.d.ts +7 -0
  74. package/dist/components/MListItem.vue.d.ts +24 -0
  75. package/dist/components/MListSubheader.vue.d.ts +6 -0
  76. package/dist/components/MLoadingIndicator.vue.d.ts +10 -0
  77. package/dist/components/MLoadingOverlay.vue.d.ts +5 -0
  78. package/dist/components/MMarkdown.vue.d.ts +3 -0
  79. package/dist/components/MMaskField.vue.d.ts +15 -0
  80. package/dist/components/MMasonry.vue.d.ts +5 -0
  81. package/dist/components/MMenu.vue.d.ts +3 -6
  82. package/dist/components/MMenuDivider.vue.d.ts +4 -0
  83. package/dist/components/MMenuItem.vue.d.ts +5 -0
  84. package/dist/components/MMultiAutocomplete.vue.d.ts +20 -0
  85. package/dist/components/MMultiSelect.vue.d.ts +21 -0
  86. package/dist/components/MNavigationBar.vue.d.ts +2 -0
  87. package/dist/components/MNavigationDrawer.vue.d.ts +11 -0
  88. package/dist/components/MNavigationRail.vue.d.ts +9 -6
  89. package/dist/components/MNavigationSuite.vue.d.ts +5 -3
  90. package/dist/components/MNumberField.vue.d.ts +17 -0
  91. package/dist/components/MOverlay.vue.d.ts +3 -0
  92. package/dist/components/MPageProgress.vue.d.ts +3 -0
  93. package/dist/components/MPagination.vue.d.ts +3 -0
  94. package/dist/components/MPasswordMeter.vue.d.ts +1 -0
  95. package/dist/components/MPinInput.vue.d.ts +11 -0
  96. package/dist/components/MProgressBar.vue.d.ts +6 -0
  97. package/dist/components/MPullToRefresh.vue.d.ts +8 -0
  98. package/dist/components/MQRCode.vue.d.ts +6 -0
  99. package/dist/components/MRadio.vue.d.ts +5 -0
  100. package/dist/components/MRadioGroup.vue.d.ts +6 -0
  101. package/dist/components/MRating.vue.d.ts +11 -0
  102. package/dist/components/MRelativeTime.vue.d.ts +1 -0
  103. package/dist/components/MResponsive.vue.d.ts +3 -0
  104. package/dist/components/MResult.vue.d.ts +6 -0
  105. package/dist/components/MRichTextEditor.vue.d.ts +8 -0
  106. package/dist/components/MScheduler.vue.d.ts +10 -0
  107. package/dist/components/MScrollable.vue.d.ts +3 -0
  108. package/dist/components/MSearchBar.vue.d.ts +6 -0
  109. package/dist/components/MSection.vue.d.ts +5 -0
  110. package/dist/components/MSegmentedButton.vue.d.ts +5 -0
  111. package/dist/components/MSelect.vue.d.ts +17 -0
  112. package/dist/components/MShader.vue.d.ts +1 -0
  113. package/dist/components/MShortNavigationBar.vue.d.ts +8 -9
  114. package/dist/components/MSideSheet.vue.d.ts +3 -0
  115. package/dist/components/MSignaturePad.vue.d.ts +7 -0
  116. package/dist/components/MSimpleCarousel.vue.d.ts +10 -0
  117. package/dist/components/MSkeleton.vue.d.ts +8 -0
  118. package/dist/components/MSlider.vue.d.ts +14 -0
  119. package/dist/components/MSnackbar.vue.d.ts +1 -0
  120. package/dist/components/MSpinner.vue.d.ts +6 -0
  121. package/dist/components/MSplitButton.vue.d.ts +7 -0
  122. package/dist/components/MSplitter.vue.d.ts +4 -0
  123. package/dist/components/MSpotlightSearch.vue.d.ts +18 -0
  124. package/dist/components/MStack.vue.d.ts +7 -0
  125. package/dist/components/MStatCard.vue.d.ts +7 -0
  126. package/dist/components/MStepper.vue.d.ts +7 -0
  127. package/dist/components/MSticky.vue.d.ts +2 -0
  128. package/dist/components/MSubtitle.vue.d.ts +4 -0
  129. package/dist/components/MSwitch.vue.d.ts +5 -6
  130. package/dist/components/MTable.vue.d.ts +17 -4
  131. package/dist/components/MTabs.vue.d.ts +6 -0
  132. package/dist/components/MTagInput.vue.d.ts +17 -0
  133. package/dist/components/MTerminal.vue.d.ts +4 -0
  134. package/dist/components/MText.vue.d.ts +10 -0
  135. package/dist/components/MTextField.vue.d.ts +18 -0
  136. package/dist/components/MTimePicker.vue.d.ts +10 -0
  137. package/dist/components/MTimePickerModal.vue.d.ts +5 -0
  138. package/dist/components/MTimeline.vue.d.ts +3 -0
  139. package/dist/components/MTitle.vue.d.ts +4 -0
  140. package/dist/components/MToggleButton.vue.d.ts +4 -0
  141. package/dist/components/MToolbar.vue.d.ts +5 -0
  142. package/dist/components/MTooltip.vue.d.ts +7 -0
  143. package/dist/components/MTopAppBar.vue.d.ts +8 -0
  144. package/dist/components/MTour.vue.d.ts +5 -0
  145. package/dist/components/MTransferList.vue.d.ts +11 -0
  146. package/dist/components/MTree.vue.d.ts +11 -0
  147. package/dist/components/MTreeTable.vue.d.ts +7 -0
  148. package/dist/components/MVirtualTable.vue.d.ts +6 -0
  149. package/dist/components/MWindow.vue.d.ts +32 -0
  150. package/dist/composables/useLocale.d.ts +2 -0
  151. package/dist/m3ui-vue.css +1 -1
  152. package/dist/m3ui.js +5239 -5242
  153. package/dist/m3ui.js.map +1 -1
  154. package/dist/markdown.js +1 -1
  155. package/dist/markdown.js.map +1 -1
  156. package/dist/qrcode.js.map +1 -1
  157. package/dist/rich-text-editor.js +3 -3
  158. package/dist/rich-text-editor.js.map +1 -1
  159. package/dist/styles.css +1 -1
  160. package/dist/terminal.js.map +1 -1
  161. package/dist/{useLocale-CmI675Ab.js → useLocale-Drihe5G2.js} +13 -10
  162. package/dist/useLocale-Drihe5G2.js.map +1 -0
  163. package/package.json +4 -2
  164. package/src/__tests__/MHotkeys.test.ts +57 -0
  165. package/src/__tests__/hostLocale.test.ts +57 -0
  166. package/src/components/MAbsolute.vue +18 -0
  167. package/src/components/MAlert.vue +12 -0
  168. package/src/components/MAppBar.vue +12 -0
  169. package/src/components/MAppLayout.vue +11 -0
  170. package/src/components/MAspectRatio.vue +6 -0
  171. package/src/components/MAutocomplete.vue +24 -0
  172. package/src/components/MAvatar.vue +12 -1
  173. package/src/components/MBadge.vue +11 -0
  174. package/src/components/MBar.vue +19 -0
  175. package/src/components/MBarcode.vue +14 -0
  176. package/src/components/MBottomSheet.vue +12 -0
  177. package/src/components/MBox.vue +12 -0
  178. package/src/components/MBreadcrumbs.vue +7 -0
  179. package/src/components/MButton.vue +22 -4
  180. package/src/components/MButtonGroup.vue +13 -0
  181. package/src/components/MCalendar.vue +14 -0
  182. package/src/components/MCard.vue +26 -0
  183. package/src/components/MCarousel.vue +17 -1
  184. package/src/components/MCenter.vue +6 -0
  185. package/src/components/MChart.vue +12 -0
  186. package/src/components/MChatBubble.vue +17 -0
  187. package/src/components/MCheckbox.vue +11 -0
  188. package/src/components/MChip.vue +17 -0
  189. package/src/components/MCircleProgressBar.vue +13 -0
  190. package/src/components/MCodeEditor.vue +15 -0
  191. package/src/components/MColorPicker.vue +13 -0
  192. package/src/components/MColorPickerModal.vue +12 -0
  193. package/src/components/MCommandPalette.vue +16 -0
  194. package/src/components/MConfirmDialog.vue +15 -0
  195. package/src/components/MContainer.vue +9 -0
  196. package/src/components/MContextMenu.vue +17 -6
  197. package/src/components/MCopyButton.vue +16 -0
  198. package/src/components/MDataTable.vue +58 -12
  199. package/src/components/MDatePicker.vue +21 -0
  200. package/src/components/MDatePickerModal.vue +16 -0
  201. package/src/components/MDateRangePicker.vue +23 -0
  202. package/src/components/MDateRangePickerModal.vue +16 -0
  203. package/src/components/MDialog.vue +27 -7
  204. package/src/components/MDivider.vue +6 -0
  205. package/src/components/MDragDropList.vue +18 -0
  206. package/src/components/MEmoji.vue +6 -0
  207. package/src/components/MEmojiButton.vue +11 -0
  208. package/src/components/MEmojiSelector.vue +7 -0
  209. package/src/components/MEmptyState.vue +9 -0
  210. package/src/components/MExpansionPanel.vue +17 -0
  211. package/src/components/MExportButton.vue +15 -0
  212. package/src/components/MFab.vue +17 -0
  213. package/src/components/MFabMenu.vue +20 -0
  214. package/src/components/MFileUpload.vue +19 -0
  215. package/src/components/MFixed.vue +16 -0
  216. package/src/components/MFlex.vue +11 -0
  217. package/src/components/MFooter.vue +11 -0
  218. package/src/components/MFullscreen.vue +8 -0
  219. package/src/components/MGrid.vue +12 -0
  220. package/src/components/MHotkeys.vue +20 -13
  221. package/src/components/MIcon.vue +10 -1
  222. package/src/components/MIconButton.vue +13 -0
  223. package/src/components/MInfiniteScroll.vue +16 -0
  224. package/src/components/MJsonEditor.vue +13 -0
  225. package/src/components/MJsonViewer.vue +7 -0
  226. package/src/components/MKanban.vue +18 -0
  227. package/src/components/MKbd.vue +6 -0
  228. package/src/components/MLightbox.vue +16 -0
  229. package/src/components/MList.vue +15 -0
  230. package/src/components/MListDetail.vue +11 -0
  231. package/src/components/MListItem.vue +37 -0
  232. package/src/components/MListSubheader.vue +6 -0
  233. package/src/components/MLoadingIndicator.vue +15 -0
  234. package/src/components/MLoadingOverlay.vue +12 -0
  235. package/src/components/MMarkdown.vue +7 -0
  236. package/src/components/MMaskField.vue +21 -0
  237. package/src/components/MMasonry.vue +11 -0
  238. package/src/components/MMenu.vue +16 -6
  239. package/src/components/MMenuDivider.vue +4 -0
  240. package/src/components/MMenuItem.vue +16 -0
  241. package/src/components/MMultiAutocomplete.vue +26 -0
  242. package/src/components/MMultiSelect.vue +27 -0
  243. package/src/components/MNavigationBar.vue +7 -0
  244. package/src/components/MNavigationDrawer.vue +25 -0
  245. package/src/components/MNavigationRail.vue +24 -6
  246. package/src/components/MNavigationSuite.vue +20 -3
  247. package/src/components/MNotificationHost.vue +3 -0
  248. package/src/components/MNumberField.vue +24 -0
  249. package/src/components/MOverlay.vue +10 -0
  250. package/src/components/MPageProgress.vue +7 -0
  251. package/src/components/MPagination.vue +15 -1
  252. package/src/components/MPasswordMeter.vue +7 -0
  253. package/src/components/MPinInput.vue +19 -0
  254. package/src/components/MProgressBar.vue +9 -0
  255. package/src/components/MPullToRefresh.vue +17 -0
  256. package/src/components/MQRCode.vue +12 -0
  257. package/src/components/MRadio.vue +11 -0
  258. package/src/components/MRadioGroup.vue +11 -0
  259. package/src/components/MRating.vue +19 -0
  260. package/src/components/MRelative.vue +8 -0
  261. package/src/components/MRelativeTime.vue +6 -0
  262. package/src/components/MResponsive.vue +9 -0
  263. package/src/components/MResult.vue +14 -0
  264. package/src/components/MRichTextEditor.vue +14 -0
  265. package/src/components/MScheduler.vue +21 -0
  266. package/src/components/MScrollable.vue +8 -0
  267. package/src/components/MSearchBar.vue +17 -0
  268. package/src/components/MSection.vue +13 -0
  269. package/src/components/MSegmentedButton.vue +10 -0
  270. package/src/components/MSelect.vue +22 -0
  271. package/src/components/MShader.vue +13 -0
  272. package/src/components/MShape.vue +6 -0
  273. package/src/components/MShortNavigationBar.vue +23 -9
  274. package/src/components/MSideSheet.vue +13 -0
  275. package/src/components/MSignaturePad.vue +15 -0
  276. package/src/components/MSimpleCarousel.vue +18 -0
  277. package/src/components/MSkeleton.vue +8 -0
  278. package/src/components/MSlider.vue +21 -0
  279. package/src/components/MSnackbar.vue +5 -0
  280. package/src/components/MSpacer.vue +6 -0
  281. package/src/components/MSpinner.vue +10 -0
  282. package/src/components/MSplitButton.vue +14 -0
  283. package/src/components/MSplitter.vue +10 -0
  284. package/src/components/MSpotlightSearch.vue +27 -0
  285. package/src/components/MStack.vue +12 -0
  286. package/src/components/MStatCard.vue +13 -0
  287. package/src/components/MStepper.vue +12 -0
  288. package/src/components/MSticky.vue +7 -0
  289. package/src/components/MSubtitle.vue +9 -0
  290. package/src/components/MSupportingPane.vue +10 -0
  291. package/src/components/MSwitch.vue +14 -6
  292. package/src/components/MTable.vue +33 -4
  293. package/src/components/MTabs.vue +12 -0
  294. package/src/components/MTagInput.vue +23 -0
  295. package/src/components/MTerminal.vue +11 -0
  296. package/src/components/MText.vue +15 -0
  297. package/src/components/MTextField.vue +26 -0
  298. package/src/components/MTimePicker.vue +15 -0
  299. package/src/components/MTimePickerModal.vue +12 -0
  300. package/src/components/MTimeline.vue +7 -0
  301. package/src/components/MTitle.vue +9 -0
  302. package/src/components/MToggleButton.vue +12 -0
  303. package/src/components/MToolbar.vue +12 -0
  304. package/src/components/MTooltip.vue +15 -0
  305. package/src/components/MTopAppBar.vue +18 -0
  306. package/src/components/MTour.vue +13 -0
  307. package/src/components/MTransferList.vue +24 -0
  308. package/src/components/MTree.vue +11 -0
  309. package/src/components/MTreeTable.vue +15 -0
  310. package/src/components/MVirtualTable.vue +12 -0
  311. package/src/components/MWindow.vue +34 -0
  312. package/src/composables/useLocale.ts +16 -3
  313. package/src/plugin.ts +2 -1
  314. package/dist/MTextField-B0wGv1Mx.js.map +0 -1
  315. package/dist/useLocale-CmI675Ab.js.map +0 -1
package/dist/API.md ADDED
@@ -0,0 +1,3661 @@
1
+ # @m3ui-vue/m3ui-vue 0.9.1 — API reference
2
+
3
+ Material Design 3 components for Vue 3 + Tailwind CSS v4. Generated from the source by
4
+ `scripts/generate-api.mjs`; full docs with live demos at https://m3ui.dev.
5
+
6
+ ## Setup
7
+
8
+ ```css
9
+ /* main stylesheet, in this order */
10
+ @import 'tailwindcss';
11
+ @import '@m3ui-vue/m3ui-vue/theme';
12
+ @import '@m3ui-vue/m3ui-vue/palettes';
13
+ @import '@m3ui-vue/m3ui-vue/styles';
14
+ ```
15
+
16
+ ```ts
17
+ // optional: default palette and translated built-in strings
18
+ import { createM3UI } from '@m3ui-vue/m3ui-vue'
19
+ import { esLocale } from '@m3ui-vue/m3ui-vue/locales'
20
+ app.use(createM3UI({ palette: 'blue', locale: esLocale }))
21
+ ```
22
+
23
+ - Icons use the Material Symbols Outlined font (load it yourself, e.g. from Google Fonts); `icon` props take a
24
+ Material Symbols name such as `'home'`.
25
+ - Import components by name: `import { MButton, MDialog } from '@m3ui-vue/m3ui-vue'`. Components with heavy optional peer
26
+ dependencies live in their own entry points (noted on each one): `@m3ui-vue/m3ui-vue/chart`, `@m3ui-vue/m3ui-vue/code-editor`, `@m3ui-vue/m3ui-vue/markdown`, `@m3ui-vue/m3ui-vue/rich-text-editor`, `@m3ui-vue/m3ui-vue/terminal`, `@m3ui-vue/m3ui-vue/qrcode`, `@m3ui-vue/m3ui-vue/barcode`.
27
+ - Dark mode is the `dark` class on `<html>` (`useTheme()` manages it); palettes are `data-palette="<id>"` on `<html>`
28
+ (`useColorPalette()`).
29
+ - Style your own markup with the M3 tokens as Tailwind utilities: `bg-surface-container`, `text-on-surface-variant`,
30
+ `text-title-medium`, `rounded-lg`, `shadow-elevation-2`.
31
+ - Two-way props are `v-model` (`modelValue`) or `v-model:<name>`, marked "(v-model)" below.
32
+
33
+ ## Components
34
+
35
+ ### MAbsolute
36
+
37
+ Declarative absolute positioning without Tailwind classes. Supports manual offsets, placement shortcuts, and per-axis control. Pair it with `MRelative` as the positioning parent.
38
+
39
+ Props:
40
+ - `placement?: Placement` — Preset corner/edge placement
41
+ - `offset?: string | number = 0` — Distance from edges when using placement (applies to both axes)
42
+ - `offsetX?: string | number` — Horizontal offset — overrides offset for the X axis
43
+ - `offsetY?: string | number` — Vertical offset — overrides offset for the Y axis
44
+ - `top?: string | number` — Top offset (number = px). Defaults to 8px when neither placement nor any of top/right/bottom/left is set
45
+ - `right?: string | number` — Right offset
46
+ - `bottom?: string | number` — Bottom offset
47
+ - `left?: string | number` — Left offset. Defaults to 8px when neither placement nor any of top/right/bottom/left is set
48
+ - `inset?: boolean = false` — Set all sides to 0
49
+ - `zIndex?: number` — Z-index value
50
+
51
+ Slots:
52
+ - `#default` — Content.
53
+
54
+ ```ts
55
+ export type Placement =
56
+ | 'top-left' | 'top-center' | 'top-right'
57
+ | 'center-left' | 'center' | 'center-right'
58
+ | 'bottom-left' | 'bottom-center' | 'bottom-right'
59
+ ```
60
+
61
+ ### MAlert
62
+
63
+ An inline banner for contextual status messages — info, success, warning, or error.
64
+
65
+ Props:
66
+ - `type?: "info" | "success" | "warning" | "error" = "info"` — Alert variant and color
67
+ - `title?: string` — Bold title text
68
+ - `closeable?: boolean = false` — Show close button
69
+ - `closeAriaLabel?: string` — Aria label for the close button (falls back to the locale string)
70
+
71
+ Events:
72
+ - `close()` — Emitted when the close button is clicked. The parent owns visibility — pair with v-if/v-else to actually hide the alert.
73
+
74
+ Slots:
75
+ - `#default` — Alert body content
76
+ - `#actions` — Optional row of action buttons rendered below the body
77
+
78
+ ### MAppBar
79
+
80
+ A simple, generic slot-based app bar with leading, default, and trailing areas — a lighter-weight alternative to MTopAppBar for when you don't need its variant/title-row layouts.
81
+
82
+ Props:
83
+ - `color?: "surface" | "primary" | "secondary" | "tertiary" = "surface"` — Background color
84
+ - `elevated?: boolean` — Add shadow elevation
85
+ - `dense?: boolean` — Compact height (48px vs 64px)
86
+ - `bordered?: boolean` — Add a bottom border (border-outline-variant)
87
+
88
+ Slots:
89
+ - `#leading` — Leading area (e.g. back button, menu icon)
90
+ - `#default` — Main content (title text)
91
+ - `#trailing` — Trailing action buttons
92
+
93
+ ### MAppLayout
94
+
95
+ Full app shell — drawer, header, content, footer, and fab slots.
96
+
97
+ Props:
98
+ - `height?: string` — Container height (CSS value). Use "100%" to fit inside a parent instead of the viewport.
99
+ - `drawerRight?: boolean` — Place the drawer slot on the right side of the layout
100
+
101
+ Slots:
102
+ - `#drawer` — Side navigation (e.g. MNavigationDrawer). Use drawerRight prop to place it on the right.
103
+ - `#header` — Top bar (e.g. MTopAppBar)
104
+ - `#default` — Main scrollable content
105
+ - `#footer` — Bottom bar or status area
106
+ - `#fab` — Floating elements (e.g. MFab) rendered outside the scroll area
107
+
108
+ ### MAspectRatio
109
+
110
+ Maintains a consistent aspect ratio for media or containers.
111
+
112
+ Props:
113
+ - `ratio?: string | number = "16/9"` — Aspect ratio (e.g. "16/9", "4/3", 1) — passed straight through to the CSS aspect-ratio property
114
+
115
+ Slots:
116
+ - `#default` — Content, sized to fill the box.
117
+
118
+ ### MAutocomplete
119
+
120
+ Like MSelect but with a text input for filtering. Type to search, arrow keys to navigate, Enter to select.
121
+
122
+ Props:
123
+ - `modelValue: unknown` (v-model) — Selected value (v-model)
124
+ - `options: SelectOption[]` — The options to choose from; see `SelectOption`.
125
+ - `label?: string` — Floating label text
126
+ - `placeholder?: string` — Input placeholder
127
+ - `variant?: "filled" | "outlined" = "filled"` — Field style
128
+ - `mode?: "docked" | "modal" = "docked"` — Dropdown mode: docked (inline) or modal (dialog)
129
+ - `disabled?: boolean = false` — Disables the field
130
+ - `error?: boolean` — Error state
131
+ - `errorLabel?: string` — Error message shown when error is true
132
+ - `hint?: string` — Helper text below field
133
+ - `required?: boolean = false` — Marks as required — adds a red asterisk after the label
134
+ - `leadingIcon?: string` — Material Symbol icon name
135
+ - `clearable?: boolean = false` — Show a clear button
136
+ - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the outlined border
137
+ - `noResultsText?: string` — Text when no options match
138
+ - `debounce?: number = 0` — Delay (ms) before filtering and firing
139
+
140
+ Events:
141
+ - `update:modelValue(unknown)` — Emitted on selection — powers v-model
142
+ - `debounced(string)` — Emitted debounce ms after the user stops typing the search query (only when debounce > 0)
143
+
144
+ ### MAvatar
145
+
146
+ A circular initials avatar. There's no image-source prop — it always renders extracted initials or a fallback string, never a photo.
147
+
148
+ Props:
149
+ - `name?: string` — Full name — initials are extracted automatically (first + last). Takes priority over fallback
150
+ - `fallback?: string` — Custom text shown when name is not provided (e.g. 'AJ'). Falls back to '?' if neither is set
151
+ - `size?: number = 40` — Avatar size in px — also scales the font size proportionally (40%)
152
+
153
+ ### MBadge
154
+
155
+ A small numeric or dot indicator overlaid on another element, such as an icon button or avatar.
156
+
157
+ Props:
158
+ - `count?: number` — Numeric badge value
159
+ - `dot?: boolean` — Show a small dot instead of a number
160
+ - `color?: "error" | "primary" | "secondary" | "tertiary" = "error"` — Badge color
161
+ - `max?: number = 99` — Max value before showing "N+"
162
+ - `position?: BadgePosition = "top-right"` — Corner where the badge is placed
163
+ - `overlap?: BadgeOverlap = "edge"` — How much the badge overlaps the content
164
+
165
+ Slots:
166
+ - `#default` — The element the badge sits on.
167
+
168
+ ```ts
169
+ export type BadgePosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
170
+ ```
171
+
172
+ ```ts
173
+ export type BadgeOverlap = 'inside' | 'outside' | 'edge'
174
+ ```
175
+
176
+ ### MBar
177
+
178
+ A draggable Electron title bar for frameless windows (`frame: false`). Sets `-webkit-app-region: drag` on itself and carves out `no-drag` around the icon, controls, and slot content, so those stay clickable. It can't touch the real OS window — minimize/maximize/close just emit events for your app to forward over IPC.
179
+
180
+ Props:
181
+ - `title?: string` — Window title text
182
+ - `icon?: string` — Material Symbol name, or an image src (URL, data URI, or a path with a file extension) — detected automatically.
183
+ - `titleAlign?: "center" | "start" = "start"` — Centered floats over the whole bar so it stays centered regardless of side content width
184
+ - `controls?: boolean` — Show the minimize/maximize/close buttons as a group. Defaults to `true`, except on `platform="macos"` where the OS draws native traffic lights instead.
185
+ - `minimizable?: boolean` — Individually hide one control while keeping the others — e.g. a fixed-size window with no maximize button.
186
+ - `maximizable?: boolean` — Show the maximize/restore button on its own
187
+ - `closable?: boolean` — Show the close button on its own
188
+ - `maximized?: boolean = false` — Reflects the real window state — the bar has no way to know it itself, the host app must read it from its Electron main process and pass it down.
189
+ - `platform?: "windows" | "macos" = "windows"` — 'macos' reserves space for the native traffic lights and hides the drawn controls by default
190
+ - `height?: number = 36` — Bar height in px.
191
+ - `doubleClickMaximize?: boolean = true` — Double-clicking empty drag space toggles maximize, matching native title bar behavior.
192
+
193
+ Events:
194
+ - `close()` — Emitted when the close button is clicked
195
+ - `minimize()` — Emitted when the minimize button is clicked — forward to your Electron IPC call
196
+ - `maximize()` — Emitted when the maximize/restore button is clicked, or (with doubleClickMaximize) empty drag space is double-clicked
197
+
198
+ Slots:
199
+ - `#icon` — Replaces the icon — e.g. an `<img>` logo instead of a Material Symbol
200
+ - `#title` — Replaces the title text
201
+ - `#default` — Extra content between the title and the trailing area (drag-adjacent, e.g. tabs)
202
+ - `#trailing` — Action buttons right before minimize/maximize/close
203
+
204
+ ### MBarcode
205
+
206
+ Import from `@m3ui-vue/m3ui-vue/barcode`.
207
+
208
+ Renders a barcode as inline SVG. Available from the `/barcode` entry point.
209
+
210
+ Props:
211
+ - `value: string` — Data to encode. Required — there is no default.
212
+ - `format?: string = "CODE128"` — Barcode symbology. Common values: 'CODE128', 'EAN13', 'EAN8', 'UPC', 'CODE39', 'ITF14', 'MSI', 'pharmacode', 'codabar'.
213
+ - `width?: number = 2` — Width of the narrowest bar, in px
214
+ - `height?: number = 80` — Bar height in px
215
+ - `displayValue?: boolean = true` — Show the encoded text below the bars
216
+ - `color?: string = "#000000"` — Bar color
217
+ - `background?: string = "#ffffff"` — Background color
218
+ - `margin?: number = 10` — Quiet zone around the barcode, in px
219
+ - `fontSize?: number = 20` — Font size for the displayed value
220
+ - `label?: string` — aria-label for the svg. Defaults to value
221
+
222
+ Slots:
223
+ - `#error` — Shown instead of the SVG when value is invalid for the given format (e.g. a non-numeric EAN13)
224
+
225
+ ### MBottomSheet
226
+
227
+ A sheet that slides up from the bottom of the screen, capped at a 640px max width and rounded top corners. Supports drag-to-dismiss via the handle bar, or tapping the scrim.
228
+
229
+ Props:
230
+ - `modelValue: boolean` (v-model) — Open/closed state (v-model)
231
+ - `title?: string` — Sheet header title
232
+ - `fullHeight?: boolean = false` — Use max-h-[92vh] instead of the default max-h-[60vh]
233
+
234
+ Events:
235
+ - `update:modelValue(boolean)` — Emitted when the sheet closes (scrim click, drag-to-dismiss, or the close button) — powers v-model
236
+
237
+ Slots:
238
+ - `#default` — Sheet body content (scrollable)
239
+ - `#actions` — Footer action buttons, shown in a bordered strip below the content
240
+
241
+ ### MBox
242
+
243
+ Generic surface box with padding, radius, elevation, and border — a building block for ad-hoc layout that doesn't warrant a dedicated component.
244
+
245
+ Props:
246
+ - `surface?: "default" | "container" | "container-low" | "container-high" | "container-highest" | "primary-container" | "secondary-container" | "tertiary-container" | "inverse"` — Surface color variant
247
+ - `padding?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "none"` — Padding size
248
+ - `rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full" = "none"` — Border radius
249
+ - `elevation?: 0 | 1 | 2 | 3 = 0` — Shadow elevation level
250
+ - `border?: boolean = false` — Show border
251
+ - `tag?: string = "div"` — HTML tag to render
252
+
253
+ Slots:
254
+ - `#default` — Content.
255
+
256
+ ### MBreadcrumbs
257
+
258
+ A navigation trail showing the current page's location within a hierarchy, with icons and custom separators.
259
+
260
+ Props:
261
+ - `items: BreadcrumbItem[]` — Breadcrumb items (see `BreadcrumbItem`)
262
+ - `separator?: string = "chevron_right"` — Material Symbol separator icon
263
+
264
+ Events:
265
+ - `select(BreadcrumbItem, number)` — Emitted when a non-last, non-disabled item is clicked
266
+
267
+ ```ts
268
+ export interface BreadcrumbItem {
269
+ label: string
270
+ icon?: string
271
+ to?: string
272
+ disabled?: boolean
273
+ }
274
+ ```
275
+
276
+ ### MButton
277
+
278
+ The standard M3 button — five variants, five expressive size tiers, and either color.
279
+
280
+ Props:
281
+ - `variant?: "elevated" | "filled" | "outlined" | "tonal" | "text" = "filled"` — Visual style of the button
282
+ - `color?: string = "primary"` — Named semantic color ('primary' | 'error') OR any CSS color string ('red', '#e91e63', 'oklch(0.6 0.2 0)', …). When a CSS color is passed, --color-primary is overridden for this button.
283
+ - `type?: "button" | "submit" | "reset" = "button"` — HTML button type
284
+ - `disabled?: boolean = false` — Disables interaction
285
+ - `loading?: boolean = false` — Shows a spinner and disables the button
286
+ - `icon?: string` — Material Symbol icon name shown next to the label
287
+ - `iconPos?: "leading" | "trailing" = "leading"` — Which side of the label the icon renders on
288
+ - `size?: "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — M3's 5-tier expressive button sizing (xs: 32px, sm: 40px, md: 56px, lg: 96px, xl: 136px) — lg/xl are meant for hero-style prominent buttons, not everyday UI
289
+ - `shape?: "rounded" | "squared" = "rounded"` — Button shape — rounded (pill, always) or squared (corner radius scales with size: 12px xs/sm, 16px md, 28px lg/xl)
290
+ - `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
291
+
292
+ Slots:
293
+ - `#default` — The button's label.
294
+
295
+ ### MButtonGroup
296
+
297
+ A set of buttons that share selection state — standard (separated) or connected (joined into one pill), single or multi select, any value type.
298
+
299
+ Props:
300
+ - `modelValue: unknown` (v-model) — Selected value(s) — any type (v-model)
301
+ - `options: ButtonGroupOption[]` — The options to choose from; see `ButtonGroupOption`.
302
+ - `variant?: "standard" | "connected" = "standard"` — Standard (separated) or connected (joined)
303
+ - `size?: "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — Button size
304
+ - `multiSelect?: boolean = false` — Allow multiple selections
305
+ - `selectionRequired?: boolean = false` — At least one must be selected
306
+ - `color?: "primary" | "secondary" | "tertiary" = "primary"` — Selected button color
307
+
308
+ Events:
309
+ - `update:modelValue(unknown)` — Emitted on selection change — powers v-model
310
+
311
+ ```ts
312
+ export interface ButtonGroupOption {
313
+ value: unknown
314
+ label?: string
315
+ icon?: string
316
+ disabled?: boolean
317
+ }
318
+ ```
319
+
320
+ ### MCalendar
321
+
322
+ A monthly calendar grid with color-coded, clickable events.
323
+
324
+ Props:
325
+ - `events?: CalendarEvent[] = []` — Array of events to render on the grid (see `CalendarEvent`)
326
+ - `locale?: string` — Locale for month/weekday names, via Intl.DateTimeFormat. Falls back to the app's configured locale (createM3UI({ locale })) — same pattern as MRelativeTime
327
+ - `todayLabel?: string` — Label for the Today button — falls back to the locale's own string when unset
328
+ - `prevMonthLabel?: string` — Aria label for the previous-month button — falls back to the locale's own string when unset
329
+ - `nextMonthLabel?: string` — Aria label for the next-month button — falls back to the locale's own string when unset
330
+
331
+ Events:
332
+ - `dateClick(string)` — Emitted when an empty part of a day cell is clicked
333
+ - `eventClick(CalendarEvent)` — Emitted when an event pill is clicked
334
+
335
+ ```ts
336
+ export interface CalendarEvent {
337
+ id: string | number
338
+ title: string
339
+ date: string
340
+ color?: 'primary' | 'secondary' | 'tertiary' | 'error' | 'success'
341
+ icon?: string
342
+ }
343
+ ```
344
+
345
+ ### MCard
346
+
347
+ A flexible surface for grouping related content — three variants following the M3 elevation system, with optional header image, structured title/subtitle, and action buttons.
348
+
349
+ Props:
350
+ - `variant?: "elevated" | "filled" | "outlined" = "elevated"` — Card surface style
351
+ - `clickable?: boolean = false` — Makes the card an interactive element — hover/press elevation (varies by variant per M3), a focus ring/border on keyboard focus, and reachable/activatable via Tab + Enter/Space, not just mouse
352
+ - `elevated?: boolean = false` — Shortcut that forces the elevated variant regardless of variant — true is equivalent to variant='elevated'
353
+ - `disabled?: boolean = false` — Disabled visual state (own per-variant color, not just a dimmed one) and, when combined with clickable, blocks interaction entirely
354
+ - `image?: string` — src URL for a full-bleed header image
355
+ - `imageAlt?: string` — Alt text for the header image
356
+ - `imageHeight?: string` — Tailwind height class for the image
357
+ - `title?: string` — Card title text
358
+ - `subtitle?: string` — Supporting text below the title
359
+
360
+ Slots:
361
+ - `#media` — Custom media content (alternative to the image prop)
362
+ - `#header` — Custom header content (overrides title/subtitle props)
363
+ - `#default` — Main content area (raw, no wrapper)
364
+ - `#actions` — Bottom action buttons (flex row, right-aligned)
365
+
366
+ ### MCarousel
367
+
368
+ The Material 3 carousel, with its four layouts. Items keep one size and are laid out side by side; as you scroll, each one is masked down to the space it has, so items grow as they reach the focal position and shrink as they leave. Drag it (touch or mouse), scroll it with a trackpad or a horizontal wheel, or focus it and use the arrow keys. For fixed-width slides with arrows and autoplay, see MSimpleCarousel.
369
+
370
+ Props:
371
+ - `items: T[]` — Items to render, required. CarouselItem by default; any type with an #item slot
372
+ - `modelValue?: number` (v-model) — Index of the current (snapped) item; use with v-model to follow or drive it.
373
+ - `variant?: CarouselVariant = "multi-browse"` — Carousel layout
374
+ - `orientation?: "horizontal" | "vertical" = "horizontal"` — Scroll axis
375
+ - `itemSize?: number` — Size of large items along the scroll axis, in px. Multi-browse and hero treat it as the preferred size (the arrangement that fits best wins); uncontained uses it as is. Hero without it fills the container minus its small items; full-screen ignores it.
376
+ - `itemSpacing?: number = 8` — Space between items, in px (M3 uses 8).
377
+ - `contentPadding?: number = 0` — Padding at both ends of the scroll axis, in px. Items scroll under it.
378
+ - `minSmallItemSize?: number = 40` — Smallest size a small item can take (multi-browse, hero)
379
+ - `maxSmallItemSize?: number = 56` — Largest size a small item can take (multi-browse, hero)
380
+ - `flingBehavior?: CarouselFlingBehavior` — What a release does. Defaults to 'no-snap' for uncontained, 'single-advance' otherwise.
381
+ - `userScrollEnabled?: boolean = true` — Allow dragging, wheel and keyboard scrolling
382
+ - `height?: string` — Height of the carousel. Defaults to 205px for a horizontal carousel that isn't full-screen.
383
+ - `label?: string` — Accessible name of the carousel.
384
+
385
+ Events:
386
+ - `update:modelValue(index: number)` — The current item changed
387
+ - `itemClick(item: T, index: number)` — An item was clicked (not dragged). A partly visible item also scrolls into focus
388
+
389
+ Slots:
390
+ - `#item { item: T; index: number; }` — Content of each item, filling its full (unmasked) box. Replaces the default image and label
391
+
392
+ ```ts
393
+ export interface CarouselItem {
394
+ src: string
395
+ alt?: string
396
+ label?: string
397
+ }
398
+ ```
399
+
400
+ ```ts
401
+ export type CarouselVariant = 'multi-browse' | 'uncontained' | 'hero' | 'full-screen'
402
+ ```
403
+
404
+ ```ts
405
+ export type CarouselFlingBehavior = 'single-advance' | 'multi-browse' | 'no-snap'
406
+ ```
407
+
408
+ ### MCenter
409
+
410
+ Centers its children both horizontally and vertically.
411
+
412
+ Props:
413
+ - `inline?: boolean = false` — Use inline-flex instead of flex
414
+
415
+ Slots:
416
+ - `#default` — Content, centered.
417
+
418
+ ### MChart
419
+
420
+ Import from `@m3ui-vue/m3ui-vue/chart`.
421
+
422
+ A thin Chart.js wrapper — line, bar, pie, doughnut, and radar types, with legend/tooltip/axis colors that automatically track the active M3 theme (light/dark, and any palette swap). Available from the `/chart` entry point.
423
+
424
+ Props:
425
+ - `type: ChartType` — Chart type. Required — there is no default.
426
+ - `data: Record<string, any>` — Chart.js data object with labels and datasets. Required — there is no default.
427
+ - `options?: Record<string, any>` — Chart.js options, deep-merged on top of MChart's own M3-themed defaults (legend/tooltip/axis colors that track the active theme automatically)
428
+ - `height?: string = "300px"` — Chart height
429
+
430
+ ```ts
431
+ type ChartType = 'line' | 'bar' | 'pie' | 'doughnut' | 'radar'
432
+ ```
433
+
434
+ ### MChatBubble
435
+
436
+ A chat message bubble — sender name, avatar, timestamp, and read status, for left (received) or right (sent) messages.
437
+
438
+ Props:
439
+ - `text?: string` — Message text (or use the default slot for custom content)
440
+ - `sender?: string` — Sender name shown above the bubble (left-side only)
441
+ - `time?: string` — Timestamp string (e.g. "10:32")
442
+ - `side?: "right" | "left" = "left"` — Left = received, right = sent
443
+ - `avatar?: string` — Avatar name — shows an MAvatar with these initials (left-side only)
444
+ - `status?: "sent" | "delivered" | "read"` — Message status icon next to the timestamp (right-side only)
445
+ - `color?: "primary" | "secondary" | "tertiary" = "primary"` — Bubble color for sent (right-side) messages
446
+ - `tail?: boolean = true` — Show the bubble tail (a sharper corner on the side nearest the sender)
447
+ - `size?: "medium" | "small" | "large" = "medium"` — Text size (body-small / body-medium / body-large)
448
+ - `maxWidth?: string = "320px"` — Max bubble width (px, %, or var()) — supports a CSS variable for responsive control
449
+ - `typing?: "text" | "audio"` — Shows a live indicator instead of the content: bouncing dots while the other person types, or a mic with a moving waveform while they record audio.
450
+
451
+ Slots:
452
+ - `#default` — Custom content inside the bubble, replacing the text prop — images, files, buttons, or any layout
453
+
454
+ ### MCheckbox
455
+
456
+ A checkbox with checked, indeterminate, and disabled states, and 4 semantic color options.
457
+
458
+ Props:
459
+ - `modelValue: boolean` (v-model) — Checked state (v-model)
460
+ - `indeterminate?: boolean = false` — Indeterminate state
461
+ - `disabled?: boolean = false` — Disables the checkbox
462
+ - `label?: string` — Label text — overridden by the default slot when present
463
+ - `color?: "error" | "primary" | "secondary" | "tertiary" = "primary"` — Checked/indeterminate color
464
+ - `ariaLabel?: string` — Accessible name for the input when there's no visible label (e.g. a list row's checkbox).
465
+
466
+ Events:
467
+ - `update:modelValue(boolean)` — Emitted with the new checked state.
468
+
469
+ Slots:
470
+ - `#default` — Custom label content — overrides the label prop when provided
471
+
472
+ ### MChip
473
+
474
+ Compact elements for filters, input, or actions — named semantic tones or any CSS color, with optional icon, click, selection, and removal support.
475
+
476
+ Props:
477
+ - `tone?: string = "neutral"` — Color tone or any CSS color string
478
+ - `selected?: boolean = false` — Selected/active state — the chip's shape morphs from a rounded rect to a full pill when selected
479
+ - `removable?: boolean = false` — Show a remove (X) button
480
+ - `clickable?: boolean = false` — Makes the chip an interactive `<button>` with hover/press/focus feedback (otherwise renders as a plain `<span>`)
481
+ - `disabled?: boolean = false` — Disables interaction
482
+ - `icon?: string` — Leading Material Symbol icon
483
+
484
+ Events:
485
+ - `click()` — Emitted when a clickable, non-disabled chip is clicked
486
+ - `remove()` — Emitted when the remove (X) button is clicked (removable only)
487
+
488
+ Slots:
489
+ - `#default` — The chip's label.
490
+
491
+ ### MCircleProgressBar
492
+
493
+ A circular progress indicator — a smooth arc, or the M3 Expressive wavy ring that fades between a circle and a bumpy wave near the extremes.
494
+
495
+ Props:
496
+ - `value?: number` — Progress 0–100 (omit when indeterminate)
497
+ - `indeterminate?: boolean` — Spinning arc — no value needed. Identical for both variants.
498
+ - `color?: "error" | "primary" | "secondary" | "tertiary" = "primary"` — Ring color
499
+ - `variant?: "wavy" | "circle" = "wavy"` — wavy: animated bumpy ring that fades to circle near 0% and 100%; circle: smooth arc
500
+ - `label?: string` — Label text below the circle
501
+ - `size?: number` — Diameter in px — matches the real M3 WaveSize/Size tokens per variant
502
+ - `thickness?: number = 4` — Stroke width of the ring/wave in px, matching the real M3 token
503
+
504
+ Slots:
505
+ - `#default` — Custom content centered inside the ring. When provided, the percentage label is hidden.
506
+
507
+ ### MCodeEditor
508
+
509
+ Import from `@m3ui-vue/m3ui-vue/code-editor`.
510
+
511
+ A syntax-highlighted code editor built on CodeMirror 6, with a header bar, line numbers, and a copy button.
512
+
513
+ Props:
514
+ - `modelValue: string` (v-model) — Editor content (v-model)
515
+ - `language?: Language = "javascript"` — Syntax language
516
+ - `readonly?: boolean = false` — Read-only mode
517
+ - `lineNumbers?: boolean = true` — Show line numbers
518
+ - `theme?: "light" | "dark" = "light"` — Color theme
519
+ - `minHeight?: string = "200px"` — Minimum editor height
520
+ - `maxHeight?: string = "600px"` — Maximum editor height
521
+ - `placeholder?: string` — Placeholder text shown via CodeMirror when the editor is empty
522
+ - `wrap?: boolean = true` — Word wrap
523
+
524
+ Events:
525
+ - `update:modelValue(string)` — Emitted on every document change — powers v-model
526
+
527
+ Slots:
528
+ - `#actions` — Extra controls rendered in the header bar, before the built-in copy button
529
+
530
+ ```ts
531
+ type Language = 'javascript' | 'typescript' | 'json' | 'html' | 'css' | 'python' | 'vue' | 'c' | 'cpp' | 'rust' | 'asm' | 'plain'
532
+ ```
533
+
534
+ ### MColorPicker
535
+
536
+ An inline, dropdown-anchored color picker — hue slider, saturation/brightness area, and preset swatches.
537
+
538
+ Props:
539
+ - `modelValue: string` (v-model) — Selected color in hex format (v-model)
540
+ - `label?: string` — Field label
541
+ - `presets?: string[] = [
542
+ "#f44336",
543
+ "#e91e63",
544
+ "#9c27b0",
545
+ "#673ab7",
546
+ "#3f51b5",
547
+ "#2196f3",
548
+ "#03a9f4",
549
+ "#00bcd4",
550
+ "#009688",
551
+ "#4caf50",
552
+ "#8bc34a",
553
+ "#cddc39",
554
+ "#ffeb3b",
555
+ "#ffc107",
556
+ "#ff9800",
557
+ "#ff5722",
558
+ "#795548",
559
+ "#607d8b",
560
+ ]` — Preset color swatches shown in the panel
561
+ - `disabled?: boolean` — Disables the picker
562
+ - `error?: boolean` — Error state
563
+ - `errorLabel?: string` — Error message shown when error is true
564
+ - `hint?: string` — Hint text below the field
565
+ - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the border
566
+
567
+ Events:
568
+ - `update:modelValue(string)` — Emitted with the picked color.
569
+
570
+ ### MColorPickerModal
571
+
572
+ A modal, centered color picker with saturation/brightness area, hue slider, hex input, and preset swatches — the sibling of MColorPicker, a fully separate component rather than a shared internal. Only emits on confirm.
573
+
574
+ Props:
575
+ - `modelValue: string` (v-model) — Selected color in hex format (v-model)
576
+ - `show?: boolean = false` (v-model:show) — Controls dialog visibility (v-model:show)
577
+ - `presets?: string[] = [
578
+ "#f44336",
579
+ "#e91e63",
580
+ "#9c27b0",
581
+ "#673ab7",
582
+ "#3f51b5",
583
+ "#2196f3",
584
+ "#03a9f4",
585
+ "#00bcd4",
586
+ "#009688",
587
+ "#4caf50",
588
+ "#8bc34a",
589
+ "#cddc39",
590
+ "#ffeb3b",
591
+ "#ffc107",
592
+ "#ff9800",
593
+ "#ff5722",
594
+ "#795548",
595
+ "#607d8b",
596
+ ]` — Preset color swatches shown in the dialog
597
+ - `title?: string` — Dialog title
598
+
599
+ Events:
600
+ - `update:modelValue(string)` — Emitted when a color is confirmed — powers v-model. Only fires on confirm, not while dragging
601
+ - `update:show(boolean)` — Emitted when the dialog opens or closes — powers v-model:show
602
+
603
+ ### MCommandPalette
604
+
605
+ A searchable, keyboard-driven command palette — grouped commands, fuzzy-free substring search, and a global hotkey (Cmd/Ctrl+K by default).
606
+
607
+ Props:
608
+ - `modelValue: boolean` (v-model) — Open/closed state (v-model). Required — there is no default.
609
+ - `items: CommandItem[]` — Commands to search over (see `CommandItem`). Required — there is no default.
610
+ - `placeholder?: string` — Search input placeholder — falls back to the locale's own string when unset
611
+ - `noResultsText?: string` — Empty-state text — falls back to the locale's own string when unset
612
+ - `hotkey?: string = "k"` — Global keyboard shortcut key, combined with Cmd/Ctrl, to toggle the palette
613
+ - `navigateHint?: string` — Footer hint text for the arrow keys — falls back to the locale's own string when unset
614
+ - `selectHint?: string` — Footer hint text for Enter — falls back to the locale's own string when unset
615
+ - `closeHint?: string` — Footer hint text for Escape — falls back to the locale's own string when unset
616
+
617
+ Events:
618
+ - `update:modelValue(boolean)` — Emitted on open/close — powers v-model
619
+ - `select(CommandItem)` — Emitted when an item is chosen (click, or Enter) — fires before the item's own onSelect callback runs
620
+
621
+ ```ts
622
+ export interface CommandItem {
623
+ id: string
624
+ label: string
625
+ icon?: string
626
+ shortcut?: string
627
+ group?: string
628
+ disabled?: boolean
629
+ onSelect?: () => void
630
+ }
631
+ ```
632
+
633
+ ### MConfirmDialog
634
+
635
+ A pre-built confirmation dialog on top of MDialog — title, message, cancel/confirm buttons, a danger color mode, and a loading state, so you don't have to hand-roll one for every "are you sure?" prompt.
636
+
637
+ Props:
638
+ - `modelValue: boolean` (v-model) — Open/closed state (v-model)
639
+ - `title: string` — Dialog title
640
+ - `message: string` — Confirmation message body
641
+ - `confirmLabel?: string` — Confirm button label — falls back to the locale string when omitted
642
+ - `cancelLabel?: string` — Cancel button label — falls back to the locale string when omitted
643
+ - `danger?: boolean = false` — Error color on the confirm button, for destructive actions
644
+ - `loading?: boolean = false` — Shows a spinner on the confirm button and disables cancel
645
+ - `closable?: boolean = true` — Passed straight through to MDialog's `closable` — show/hide the header close (X) button.
646
+
647
+ Events:
648
+ - `update:modelValue(boolean)` — Emitted when the dialog should open/close — powers v-model
649
+ - `confirm()` — Emitted when the confirm button is clicked — the dialog stays open until the caller sets modelValue to false (or clears loading)
650
+
651
+ ### MContainer
652
+
653
+ Constrains content width with responsive horizontal padding.
654
+
655
+ Props:
656
+ - `maxWidth?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | "2xl" = "lg"` — Maximum width breakpoint
657
+ - `fluid?: boolean = false` — Full-width (no max constraint)
658
+ - `centered?: boolean = true` — Center horizontally with mx-auto
659
+ - `padding?: boolean = true` — Add responsive horizontal padding
660
+
661
+ Slots:
662
+ - `#default` — Content.
663
+
664
+ ### MContextMenu
665
+
666
+ A right-click context menu composed with MMenuItem — same item/divider/submenu building blocks as MMenu, but positioned at the cursor instead of anchored to a trigger element.
667
+
668
+ Props:
669
+ - `submenuMode?: "push" | "flyout" = "flyout"` — How items with a `#children` slot behave. `'flyout'` opens a hover-positioned side panel (desktop). `'push'` replaces the panel's own content with the submenu and a back header — no positioning math, works with touch. Useful for mobile.
670
+ - `variant?: "standard" | "expressive" = "standard"` — 'standard' is M3's baseline menu (4dp corners). 'expressive' is M3's rounder 'vertical menu' styling (16dp corners) — combine with `<MMenuDivider gap />` to split the panel into independently-rounded groups with a visible gap, instead of a plain divider line.
671
+
672
+ Slots:
673
+ - `#trigger` — The element(s) that respond to right-click. MContextMenu intercepts contextmenu events automatically and positions the panel at the cursor, clamped to stay on-screen.
674
+ - `#default` — Menu items — use MMenuItem, MMenuDivider, or any element.
675
+
676
+ Exposed (template ref):
677
+ - `show: (e: MouseEvent) => void`
678
+ - `showAt: (x: number, y: number) => Promise<void>`
679
+ - `hide: () => void`
680
+
681
+ ### MCopyButton
682
+
683
+ Wraps MIconButton and swaps to a checkmark for resetDelay ms after a successful copy.
684
+
685
+ Props:
686
+ - `value: string` — Text copied to the clipboard on click
687
+ - `icon?: string = "content_copy"` — Icon shown in the idle state
688
+ - `copiedIcon?: string = "check"` — Icon shown right after a successful copy
689
+ - `label?: string = "Copy"` — aria-label in the idle state
690
+ - `copiedLabel?: string = "Copied"` — aria-label right after a successful copy
691
+ - `variant?: "filled" | "outlined" | "tonal" | "standard" = "standard"` — Visual style (same as MIconButton)
692
+ - `shape?: "rounded" | "squared" = "rounded"` — Button shape
693
+ - `size?: number | "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — Button size
694
+ - `disabled?: boolean = false` — Disables the button
695
+ - `resetDelay?: number = 2000` — Milliseconds before the icon reverts to idle after copying
696
+
697
+ Events:
698
+ - `error(unknown)` — Emitted if the browser refuses the clipboard write
699
+ - `copied(string)` — Emitted with the copied value after a successful clipboard write
700
+
701
+ ### MDataTable
702
+
703
+ A feature-rich data table — everything MTable has, plus column resize/pin/toggle, row grouping, striped/dense density, sticky header, expandable rows, and CSV export.
704
+
705
+ Props:
706
+ - `columns: DataTableColumn[]` — Column definitions; see `DataTableColumn`
707
+ - `rows: Record<string, any>[]` — Table data rows
708
+ - `loading?: boolean = false` — Show skeleton loading state
709
+ - `emptyText?: string` — Text when no rows (defaults to the locale string)
710
+ - `rowKey?: string = "id"` — Unique key field in each row
711
+ - `selectable?: boolean = false` — Enable row selection with checkboxes (by default only the checkbox toggles a row; clicking the row itself still emits row-click)
712
+ - `selectOnRowClick?: boolean = false` — With selectable, clicking anywhere on a row toggles its selection instead of emitting row-click
713
+ - `modelValue?: Record<string, any>[] = []` (v-model) — Selected rows (v-model)
714
+ - `perPage?: number = 10` — Rows per page
715
+ - `searchable?: boolean = true` — Show search input
716
+ - `expandable?: boolean = false` — Enable row expansion (requires the row-expand slot)
717
+ - `striped?: boolean = false` — Alternate row colors
718
+ - `dense?: boolean = false` — Compact row height
719
+ - `stickyHeader?: boolean = false` — Sticky table header
720
+ - `groupBy?: string` — Group rows by this column key
721
+ - `columnToggle?: boolean = false` — Allow hiding/showing columns from a menu
722
+ - `exportable?: boolean = false` — Show an export-to-CSV button
723
+ - `serverSide?: boolean = false` — Emit fetch instead of local filtering. Requires :total.
724
+ - `total?: number = 0` — Total rows (for server-side pagination)
725
+ - `page?: number = 1` (v-model:page) — Current page (v-model via update:page)
726
+ - `searchPlaceholder?: string` — Placeholder for search input (defaults to the locale string)
727
+ - `selectedText?: string` — Text for selected count badge (defaults to the locale string)
728
+ - `recordsText?: string` — Text for total records count (defaults to the locale string)
729
+ - `expandLabel?: string` — Aria label for the expand button (defaults to the locale string)
730
+ - `columnsLabel?: string` — Label for the column-toggle button (defaults to the locale string)
731
+ - `exportLabel?: string` — Label for the export button (defaults to the locale string)
732
+ - `noGroupText?: string` — Text for the ungrouped-rows bucket (defaults to the locale string)
733
+ - `minHeight?: string` — Reserves a fixed min-height for the table area (any valid CSS min-height value) so switching between loading/empty/loaded doesn't visibly resize the table. Off by default.
734
+
735
+ Events:
736
+ - `update:modelValue(Record<string, any>[])` — Emitted when the selection changes — powers v-model
737
+ - `update:page(number)` — Emitted when the page changes — powers v-model:page
738
+ - `rowClick(Record<string, any>)` — Emitted with the row's data when you click a row (unless `selectOnRowClick` makes the click select it).
739
+ - `fetch(DataTableFetchParams)` — Emitted instead of filtering locally when serverSide is true
740
+
741
+ Slots:
742
+ - `#toolbar` — Extra content in the toolbar next to the search input (filters, buttons, etc.)
743
+ - `#empty` — Custom empty-state content, replaces the default icon + text
744
+ - `#row-actions { row: Record<string, any>; }` — Per-row action buttons — rendering this slot adds a trailing actions column
745
+ - `#row-expand { row: Record<string, any>; }` — Expanded-row detail content, shown when expandable is true and the row is toggled open
746
+
747
+ ```ts
748
+ export interface DataTableColumn {
749
+ key: string
750
+ label: string
751
+ sortable?: boolean
752
+ filterable?: boolean
753
+ resizable?: boolean
754
+ width?: string
755
+ minWidth?: string
756
+ align?: 'left' | 'center' | 'right'
757
+ pinned?: 'left' | 'right'
758
+ hidden?: boolean
759
+ }
760
+ ```
761
+
762
+ ```ts
763
+ export interface DataTableFetchParams {
764
+ page: number
765
+ perPage: number
766
+ search: string
767
+ sortKey: string
768
+ sortDir: 'asc' | 'desc' | ''
769
+ }
770
+ ```
771
+
772
+ ### MDatePicker
773
+
774
+ An inline, dropdown-anchored calendar date picker with locale support and min/max range clamping.
775
+
776
+ Props:
777
+ - `modelValue: string | null` (v-model) — Selected date (YYYY-MM-DD, v-model)
778
+ - `label?: string` — Field label
779
+ - `placeholder?: string` — Placeholder shown when no date is selected — falls back to label, then the current locale's string
780
+ - `min?: string` — Minimum selectable date (YYYY-MM-DD)
781
+ - `max?: string` — Maximum selectable date (YYYY-MM-DD)
782
+ - `disabled?: boolean` — Disables the picker
783
+ - `error?: boolean` — Error state
784
+ - `errorLabel?: string` — Error message shown when error is true
785
+ - `hint?: string` — Hint text below the field
786
+ - `locale?: string` — Locale for month/day names. Falls back to the app's configured locale (createM3UI({ locale })) — same pattern as MRelativeTime
787
+ - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the border
788
+ - `prevMonthLabel?: string` — Aria label for the previous-month button — defaults to the current locale's string
789
+ - `nextMonthLabel?: string` — Aria label for the next-month button — defaults to the current locale's string
790
+
791
+ Events:
792
+ - `update:modelValue(string | null)` — Emitted with the picked date.
793
+
794
+ ### MDatePickerModal
795
+
796
+ A modal, centered date picker with calendar and keyboard input modes. For a field that opens a dropdown calendar, use MDatePicker.
797
+
798
+ Props:
799
+ - `modelValue: string | null = null` (v-model) — Selected date in YYYY-MM-DD format (v-model)
800
+ - `show?: boolean = false` (v-model:show) — Controls dialog visibility (v-model:show)
801
+ - `min?: string` — Minimum selectable date (YYYY-MM-DD)
802
+ - `max?: string` — Maximum selectable date (YYYY-MM-DD)
803
+ - `locale?: string` — Locale for month/day names. Falls back to the app's configured locale (createM3UI({ locale })) — same pattern as MRelativeTime
804
+ - `title?: string` — Dialog title
805
+
806
+ Events:
807
+ - `update:modelValue(string | null)` — Emitted when a date is confirmed — powers v-model
808
+ - `update:show(boolean)` — Emitted when the dialog opens or closes — powers v-model:show
809
+
810
+ ### MDateRangePicker
811
+
812
+ An inline, dropdown-anchored calendar for selecting a start and end date, with range highlighting.
813
+
814
+ Props:
815
+ - `modelValue: DateRange` (v-model) — Selected date range (v-model); see `DateRange`
816
+ - `label?: string` — Field label
817
+ - `placeholder?: string` — Placeholder shown when no range is selected — falls back to label, then the current locale's string
818
+ - `min?: string` — Minimum date (YYYY-MM-DD)
819
+ - `max?: string` — Maximum date (YYYY-MM-DD)
820
+ - `disabled?: boolean` — Disables the picker
821
+ - `error?: boolean` — Error state
822
+ - `errorLabel?: string` — Error message shown when error is true
823
+ - `hint?: string` — Hint text below the field
824
+ - `locale?: string` — Locale for month/day names. Falls back to the app's configured locale (createM3UI({ locale })) — same pattern as MRelativeTime
825
+ - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the border
826
+ - `prevMonthLabel?: string` — Aria label for the previous-month button — defaults to the current locale's string
827
+ - `nextMonthLabel?: string` — Aria label for the next-month button — defaults to the current locale's string
828
+ - `pickStartText?: string` — Header text shown while picking the start date — defaults to the current locale's string
829
+ - `pickEndText?: string` — Header text shown while picking the end date — defaults to the current locale's string
830
+
831
+ Events:
832
+ - `update:modelValue(DateRange)` — Emitted with the picked range.
833
+
834
+ ```ts
835
+ export interface DateRange {
836
+ start: string | null
837
+ end: string | null
838
+ }
839
+ ```
840
+
841
+ ### MDateRangePickerModal
842
+
843
+ A modal, centered date range picker with range highlighting — the sibling of MDateRangePicker, a fully separate component rather than a shared internal.
844
+
845
+ Props:
846
+ - `modelValue: DateRange` (v-model) — Selected date range (v-model) — see `DateRange`
847
+ - `show?: boolean = false` (v-model:show) — Controls dialog visibility (v-model:show)
848
+ - `min?: string` — Minimum selectable date (YYYY-MM-DD)
849
+ - `max?: string` — Maximum selectable date (YYYY-MM-DD)
850
+ - `locale?: string` — Locale for month/day names. Falls back to the app's configured locale (createM3UI({ locale })) — same pattern as MRelativeTime
851
+ - `title?: string` — Dialog title
852
+
853
+ Events:
854
+ - `update:modelValue(DateRange)` — Emitted when the end date is confirmed — powers v-model
855
+ - `update:show(boolean)` — Emitted when the dialog opens or closes — powers v-model:show
856
+
857
+ ```ts
858
+ export interface DateRange {
859
+ start: string | null
860
+ end: string | null
861
+ }
862
+ ```
863
+
864
+ ### MDialog
865
+
866
+ The generic M3 modal shell — Escape, scroll lock, and Teleport are handled internally. Supports a centered card, a full-screen variant, and an optional icon that centers the title per spec.
867
+
868
+ Props:
869
+ - `modelValue: boolean` (v-model) — Open/closed state (v-model)
870
+ - `title?: string` — Dialog title (overridable via the #title slot)
871
+ - `maxWidth?: string = "max-w-[560px]"` — A Tailwind class (`max-w-sm`) or a CSS value (`420px`, `min(90vw, 40rem)`).
872
+ - `maxHeight?: string = "max-h-[90vh]"` — Maximum height: a Tailwind class (`max-h-[60vh]`) or a CSS value (`480px`, `calc(100dvh - 4rem)`). When the content is taller, the body scrolls and a divider appears above the actions.
873
+ - `persistent?: boolean = false` — Prevent closing by clicking the scrim, pressing Escape, or the X button
874
+ - `fullscreen?: boolean = false` — Full-screen variant — slides up from the bottom, covers the entire viewport
875
+ - `closeLabel?: string` — Aria label for the close (X) button — falls back to the locale string when omitted
876
+ - `closable?: boolean = true` — Show the header close (X) button — a library addition, not part of the M3 AlertDialog spec, so it can be turned off
877
+
878
+ Events:
879
+ - `update:modelValue(boolean)` — Emitted when the dialog should open/close — powers v-model
880
+
881
+ Slots:
882
+ - `#icon` — M3 AlertDialog's optional icon (Secondary color, 24dp expected). Its presence also centers the title, per spec.
883
+ - `#title` — Overrides the title prop with custom markup
884
+ - `#default` — Dialog body content — scrolls independently when taller than maxHeight
885
+ - `#actions` — Row of action buttons — wraps to a new line instead of overflowing when labels are long
886
+
887
+ ### MDivider
888
+
889
+ A thin separator line, horizontal or vertical, with an optional centered label.
890
+
891
+ Props:
892
+ - `vertical?: boolean = false` — Render as a vertical divider (fills the height of a flex container)
893
+ - `label?: string` — Text label in the middle of the divider (horizontal only)
894
+ - `inset?: boolean = false` — Add left margin (ml-16) to align with content that has a leading icon
895
+
896
+ ### MDragDropList
897
+
898
+ A reorderable list: v-model the array and render each row with the #default slot. Works with a mouse, a finger and the keyboard. The dragged row lifts with M3's dragged-item elevation and the rest slide out of its way.
899
+
900
+ Props:
901
+ - `modelValue: DragDropItem[]` (v-model) — Array of items with a unique id (v-model)
902
+ - `handle?: boolean = false` — Drag only from a handle button at the start of each row. Touch drags start right away from the handle; without it, a whole row starts dragging after a long press so swipes still scroll the page
903
+ - `disabled?: boolean = false` — Turns reordering off (pointer and keyboard) and dims the list
904
+ - `bare?: boolean = false` — Drops the row's own look (padding, min height, hover/dragged state layer, background) so the slot draws the whole row, e.g. one card per item. Dragging, the lift shadow (as a drop-shadow that follows your content's shape) and keyboard support remain. With `handle`, bind the slot's `handleProps` onto your own grip element.
905
+
906
+ Events:
907
+ - `update:modelValue(DragDropItem[])` — Emitted with the reordered array (v-model)
908
+ - `reorder({ from: number; to: number; items: DragDropItem[]; })` — Emitted alongside update:modelValue with the source and destination indices. Useful for saving the new order to a backend
909
+
910
+ Slots:
911
+ - `#default { item: DragDropItem; index: number; dragging: boolean; handleProps: Record<string, unknown>; }` — Content of each row (or the whole row with bare). Falls back to item.id. Controls inside it (checkboxes, switches, buttons, links) keep working and never start a drag. dragging is true while the row is lifted; handleProps (with handle) goes on your own grip element via v-bind
912
+
913
+ ```ts
914
+ export interface DragDropItem {
915
+ id: string | number
916
+ [key: string]: any
917
+ }
918
+ ```
919
+
920
+ ### MEmoji
921
+
922
+ Renders a single emoji character at a fixed pixel size, with optional accessible labeling.
923
+
924
+ Props:
925
+ - `emoji: string` — The emoji character to display — required
926
+ - `size?: number = 24` — Size in pixels (sets font-size, width, and height)
927
+ - `label?: string` — Accessible label — when set, adds role="img" and aria-label
928
+
929
+ ### MEmojiButton
930
+
931
+ A single emoji button that cycles through a random pool on hover (Discord-style) and emits whichever emoji is showing when clicked.
932
+
933
+ Props:
934
+ - `emoji?: string = "😀"` — Default/current emoji shown before any hover cycling or click
935
+ - `size?: number = 28` — Emoji font size in pixels (the button itself is size + 12px)
936
+ - `label?: string` — Accessible label — defaults to 'Emoji {emoji}'
937
+ - `randomOnHover?: boolean = true` — Cycle to a random emoji on hover (Discord-style)
938
+ - `category?: string` — Limit random pool to a category id (e.g. 'smileys', 'animals')
939
+ - `disabled?: boolean = false` — Disables interaction
940
+
941
+ Events:
942
+ - `click(emoji: string)` — Emitted on click with the currently displayed emoji (whatever hover last cycled to)
943
+
944
+ ### MEmojiSelector
945
+
946
+ An emoji picker in the style of Android's and Gboard's: the full Unicode set (Emoji 15.0) by category, recently used ones first, skin tones, and search by name in the app's language. The names come from Unicode's CLDR and load only when the picker is used, one language at a time.
947
+
948
+ Props:
949
+ - `categories?: string[]` — Which categories to show (ids). All if empty.
950
+ - `search?: boolean = true` — Show the search field.
951
+ - `columns?: number` — Fixed number of columns. By default as many as fit.
952
+ - `emojiSize?: number = 28` — Emoji size in px.
953
+ - `recent?: boolean = true` — Remember picked emoji and show them first (stored in localStorage).
954
+ - `recentLimit?: number = 24` — How many recent emoji to keep.
955
+ - `skinTones?: boolean = true` — Offer skin tones (long press, right click or Shift+Enter on an emoji, or the footer button).
956
+ - `preview?: boolean = true` — Show the hovered or focused emoji with its name at the bottom.
957
+ - `height?: string = "320px"` — Height of the scrolling grid.
958
+
959
+ Events:
960
+ - `select(emoji: string)` — An emoji was picked, with the skin tone applied
961
+
962
+ Exposed (template ref):
963
+ - `focus: () => void | undefined`
964
+
965
+ ### MEmptyState
966
+
967
+ A placeholder for empty views — icon, title, description, and optional action buttons.
968
+
969
+ Props:
970
+ - `icon?: string = "inbox"` — Material Symbol icon
971
+ - `title: string` — Title text — required
972
+ - `description?: string` — Supporting description
973
+ - `compact?: boolean` — Smaller variant (24px icon in a 48px circle, less padding)
974
+
975
+ Slots:
976
+ - `#actions` — Action buttons rendered below the description
977
+
978
+ ### MExpansionPanel
979
+
980
+ A collapsible section with a smooth height animation. Works controlled via v-model, or uncontrolled by simply omitting modelValue.
981
+
982
+ Props:
983
+ - `title: string` — Panel header text
984
+ - `subtitle?: string` — Secondary text in the header, below the title
985
+ - `icon?: string` — Leading Material Symbol icon in the header
986
+ - `modelValue?: boolean` (v-model) — Open/closed state (v-model). Omit it entirely to let the panel manage its own open state internally (uncontrolled).
987
+ - `disabled?: boolean = false` — Disables toggling
988
+ - `variant?: "elevated" | "filled" | "outlined" = "outlined"` — Visual style of the panel container
989
+
990
+ Events:
991
+ - `update:modelValue(boolean)` — Emitted when the panel is toggled — only meaningful when modelValue is passed (controlled usage); powers v-model
992
+
993
+ Slots:
994
+ - `#default` — Panel body content, revealed with a height animation when open
995
+
996
+ ### MExportButton
997
+
998
+ Serializes the data prop and triggers a real browser download — no dependencies.
999
+
1000
+ Props:
1001
+ - `data: Record<string, unknown>[]` — Array of objects to export
1002
+ - `format?: "json" | "csv" = "csv"` — Export format
1003
+ - `filename?: string = "export"` — Filename without extension — the extension is added automatically
1004
+ - `label?: string = "Export"` — Button label (overridden by the default slot)
1005
+ - `icon?: string = "download"` — Leading Material Symbol icon
1006
+ - `variant?: "elevated" | "filled" | "outlined" | "tonal" | "text" = "outlined"` — Visual style (same as MButton)
1007
+ - `size?: "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — Button size
1008
+ - `disabled?: boolean = false` — Disables the button
1009
+
1010
+ Events:
1011
+ - `error(unknown)` — Emitted if serialization or the download trigger fails
1012
+ - `exported({ format: string; filename: string; })` — Emitted after a successful download is triggered
1013
+
1014
+ Slots:
1015
+ - `#default` — Replaces the label text prop
1016
+
1017
+ ### MFab
1018
+
1019
+ A Floating Action Button for the primary action of a screen. Supports extended (icon+label), a speed-dial of small items, or a fully custom expanding panel via the `#content` slot.
1020
+
1021
+ Props:
1022
+ - `icon: string` — Material Symbol icon name
1023
+ - `label?: string` — Extended FAB label text
1024
+ - `color?: "surface" | "primary" | "secondary" | "tertiary" = "primary"` — Color scheme
1025
+ - `size?: "medium" | "small" | "large" | "regular" = "regular"` — FAB size
1026
+ - `disabled?: boolean = false` — Disables interaction
1027
+ - `items?: SpeedDialItem[]` — Speed-dial child items (see `SpeedDialItem`)
1028
+ - `direction?: "right" | "left" | "up" | "down" | "radial" = "up"` — Speed-dial expand direction
1029
+ - `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
1030
+ - `persistent?: boolean = false` — Keep speed-dial open after clicking an item or clicking outside
1031
+ - `align?: "start" | "end" = "start"` — For the `up`/`down` #content panel only: which edge it anchors to when it's wider than the FAB itself. 'start' (default) keeps its left edge aligned with the FAB's left edge (existing behavior); 'end' aligns the right edges instead, which keeps a wide panel from running off-screen when the FAB sits in the bottom-right corner, a common placement.
1032
+ - `scrim?: boolean = false` — Dims the rest of the screen behind the #content panel while open (has no effect on the `items` speed dial). A plain sibling with its own fade transition, independent of the panel's enter/leave transform, so it doesn't visually shrink/lag along with it.
1033
+ - `contentTransition?: "none" | "scale" | "fade" = "scale"` — How the #content panel itself animates open/closed. 'scale' (default) is the original fade+scale. 'fade' drops the scale — use this when the slot content already animates its own entrance (e.g. a staggered per-item reveal), so the panel doesn't *also* scale as a group on top of that; it still gives Vue a real transition to wait for on close, so the content's own leave animation has time to play instead of just vanishing. 'none' skips any panel-level transition entirely.
1034
+
1035
+ Events:
1036
+ - `click(MouseEvent)` — Emitted when the FAB itself is clicked (not a speed-dial item)
1037
+
1038
+ Slots:
1039
+ - `#content { close: () => boolean; }` — A panel anchored to the FAB that opens when you press it, instead of the `items` speed dial. `close()` closes it.
1040
+
1041
+ ```ts
1042
+ export interface SpeedDialItem {
1043
+ icon: string
1044
+ label?: string
1045
+ to?: string | Record<string, any>
1046
+ onClick?: () => void
1047
+ }
1048
+ ```
1049
+
1050
+ ### MFabMenu
1051
+
1052
+ The M3 "FAB Menu" — a thin wrapper around `MFab`'s `#content` slot, so opening/closing, the icon's 45° morph, outside-click, and scroll-away are all inherited from `MFab` — this component only supplies the row list. Unlike the small circular buttons of a speed dial (`MFab`'s `items` prop), each row is a full icon+label pill, revealed one at a time starting from the item closest to the FAB.
1053
+
1054
+ Props:
1055
+ - `icon: string` — Trigger FAB's Material Symbol icon — use a symmetric one like 'add', since MFab rotates it 45° on open (turning a + into a ×)
1056
+ - `label?: string` — Shows the trigger as an extended FAB (icon + text) instead of icon-only.
1057
+ - `items: FabMenuItem[]` — The menu's items; see `FabMenuItem`. An item's own color overrides the menu's color for just that row.
1058
+ - `color?: "surface" | "primary" | "secondary" | "tertiary" = "primary"` — Color scheme applied to both the trigger FAB and every menu item row
1059
+ - `size?: "small" | "large" | "regular" = "regular"` — Trigger FAB size — independent from `itemSize` below.
1060
+ - `itemSize?: "small" | "large" | "regular" = "large"` — Menu item row size — independent from the trigger FAB's own `size`.
1061
+ - `direction?: "up" | "down" = "up"` — Which side of the FAB the menu list opens toward
1062
+ - `align?: "start" | "end" = "end"` — Which edge the (usually wider-than-the-FAB) menu list anchors to — 'end' keeps it from running off-screen when the FAB sits in a bottom-right corner
1063
+ - `scrim?: boolean = true` — Dim the rest of the screen while the menu is open
1064
+ - `persistent?: boolean = false` — Keep the menu open after clicking an item or clicking outside
1065
+ - `disabled?: boolean = false` — Disables the trigger FAB
1066
+
1067
+ ```ts
1068
+ export interface FabMenuItem {
1069
+ icon: string
1070
+ label: string
1071
+ to?: string | Record<string, any>
1072
+ onClick?: () => void
1073
+ disabled?: boolean
1074
+ /** Overrides the menu's own `color` for just this row. */
1075
+ color?: 'primary' | 'secondary' | 'tertiary' | 'surface'
1076
+ }
1077
+ ```
1078
+
1079
+ ### MFileUpload
1080
+
1081
+ A drag-and-drop file upload zone with image previews, per-file size formatting, and progress/status display. It only selects files: uploading them is up to you, and each entry's status and progress show how it's going.
1082
+
1083
+ Props:
1084
+ - `accept?: string` — Accepted file types (e.g. ".png,.jpg", "image/*")
1085
+ - `multiple?: boolean = false` — Allow multiple files
1086
+ - `maxSize?: number` — Max file size in bytes — oversized files are silently filtered out
1087
+ - `disabled?: boolean = false` — Disables the upload area
1088
+ - `dropText?: string` — Drop zone main text (defaults to the locale string)
1089
+ - `selectText?: string` — Drop zone select link text (defaults to the locale string)
1090
+ - `maxSizePrefix?: string` — Prefix shown before the formatted max size (defaults to the locale string)
1091
+ - `removeLabel?: string` — Aria label for each file row's remove button (defaults to the locale string)
1092
+ - `modelValue?: UploadFile[]` (v-model) — Optional v-model. Bind it to own the list: clear it, or update each entry's status/progress. Unbound, the component keeps the list itself.
1093
+
1094
+ Events:
1095
+ - `update:modelValue(UploadFile[])` — Emitted with the new list whenever files are added, removed or cleared (v-model)
1096
+ - `select(UploadFile[])` — Emitted with the newly accepted files whenever files are added (drop or picker)
1097
+ - `remove(UploadFile)` — Emitted when a file is removed from the list with its remove button
1098
+
1099
+ Slots:
1100
+ - `#dropzone` — Replaces the default icon + text content of the drop zone
1101
+ - `#actions { files: UploadFile[]; clear: () => void; }` — Shown below the list while it has files, e.g. an "Upload" button.
1102
+
1103
+ Exposed (template ref):
1104
+ - `clear: () => void`
1105
+ - `files: UploadFile[]`
1106
+
1107
+ ```ts
1108
+ export interface UploadFile {
1109
+ file: File
1110
+ id: string
1111
+ progress: number
1112
+ status: 'pending' | 'uploading' | 'done' | 'error'
1113
+ preview?: string
1114
+ }
1115
+ ```
1116
+
1117
+ ### MFixed
1118
+
1119
+ Same API as MAbsolute but uses `position: fixed`. Positions elements relative to the viewport, not a positioned ancestor.
1120
+
1121
+ Props:
1122
+ - `placement?: Placement` — Preset corner/edge placement
1123
+ - `offset?: string | number = 0` — Distance from edges when using placement (applies to both axes)
1124
+ - `offsetX?: string | number` — Horizontal offset — overrides offset for the X axis
1125
+ - `offsetY?: string | number` — Vertical offset — overrides offset for the Y axis
1126
+ - `top?: string | number` — Top offset (number = px)
1127
+ - `right?: string | number` — Right offset
1128
+ - `bottom?: string | number` — Bottom offset
1129
+ - `left?: string | number` — Left offset
1130
+ - `inset?: boolean = false` — Set all sides to 0
1131
+ - `zIndex?: number = 50` — Z-index value
1132
+
1133
+ Slots:
1134
+ - `#default` — Content.
1135
+
1136
+ ### MFlex
1137
+
1138
+ A thin, prop-driven wrapper around CSS flexbox — direction, alignment, justification, gap, and wrap.
1139
+
1140
+ Props:
1141
+ - `direction?: "row" | "column" | "row-reverse" | "column-reverse" = "row"` — Flex direction
1142
+ - `align?: "center" | "start" | "end" | "stretch" | "baseline" = "stretch"` — Cross-axis alignment (align-items)
1143
+ - `justify?: "center" | "start" | "end" | "between" | "around" | "evenly" = "start"` — Main-axis alignment (justify-content)
1144
+ - `gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "none"` — Gap between items
1145
+ - `wrap?: boolean = false` — Allow items to wrap
1146
+ - `inline?: boolean = false` — Use inline-flex instead of flex
1147
+
1148
+ Slots:
1149
+ - `#default` — The flex items.
1150
+
1151
+ ### MFooter
1152
+
1153
+ Page footer with slots for brand, content, social links, and a bottom bar. Responsive padding adapts to screen size.
1154
+
1155
+ Props:
1156
+ - `bordered?: boolean` — Add a top border (border-outline-variant)
1157
+ - `surface?: "default" | "container" | "container-low" | "container-high" | "inverse" = "default"` — Background surface color
1158
+
1159
+ Slots:
1160
+ - `#brand` — Logo and tagline area (top)
1161
+ - `#default` — Main content area (navigation columns, etc.)
1162
+ - `#social` — Social media icon buttons (flex row with gap)
1163
+ - `#bottom` — Bottom bar with copyright / legal links (separated by a top border)
1164
+
1165
+ ### MFullscreen
1166
+
1167
+ Fills the entire viewport (or parent when `fixed=false`). Useful for loading screens, splash pages, or modal backdrops.
1168
+
1169
+ Props:
1170
+ - `fixed?: boolean = true` — Use position: fixed to fill the viewport instead of the parent element
1171
+ - `zIndex?: number = 50` — Z-index value
1172
+
1173
+ Slots:
1174
+ - `#default` — The content that goes full screen.
1175
+
1176
+ ### MGrid
1177
+
1178
+ A responsive CSS grid with per-breakpoint column counts.
1179
+
1180
+ Props:
1181
+ - `cols?: 1 | 2 | 3 | 4 | 5 | 6 | 12 = 1` — Default column count
1182
+ - `sm?: 1 | 2 | 3 | 4 | 5 | 6 | 12` — Columns at sm breakpoint
1183
+ - `md?: 1 | 2 | 3 | 4 | 5 | 6 | 12` — Columns at md breakpoint
1184
+ - `lg?: 1 | 2 | 3 | 4 | 5 | 6 | 12` — Columns at lg breakpoint
1185
+ - `xl?: 1 | 2 | 3 | 4 | 5 | 6 | 12` — Columns at xl breakpoint
1186
+ - `gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "md"` — Gap between items
1187
+ - `alignItems?: "center" | "start" | "end" | "stretch" = "stretch"` — Vertical alignment
1188
+
1189
+ Slots:
1190
+ - `#default` — The grid items.
1191
+
1192
+ ### MHotkeys
1193
+
1194
+ Registers global keyboard shortcuts for as long as it's mounted, with an optional on-screen overlay listing them grouped by category.
1195
+
1196
+ Props:
1197
+ - `bindings: HotkeyBinding[]` — Array of key combos to register globally; see `HotkeyBinding`
1198
+ - `showOverlay?: boolean = false` — Render a visible list of the registered shortcuts (otherwise the component is invisible and only listens)
1199
+
1200
+ ```ts
1201
+ export interface HotkeyBinding {
1202
+ keys: string
1203
+ label: string
1204
+ handler: () => void
1205
+ group?: string
1206
+ disabled?: boolean
1207
+ }
1208
+ ```
1209
+
1210
+ ### MIcon
1211
+
1212
+ Renders a Material Symbols Outlined glyph by name. Color follows the surrounding text color (set it with a Tailwind text-* class).
1213
+
1214
+ Props:
1215
+ - `name: string` — Material Symbol name (e.g. "settings", "favorite")
1216
+ - `size?: number = 24` — Icon size in px
1217
+
1218
+ ### MIconButton
1219
+
1220
+ A button that shows only an icon — four visual styles, the same 5-tier expressive sizing as MButton.
1221
+
1222
+ Props:
1223
+ - `icon: string` — Material Symbol icon name
1224
+ - `label?: string` — Accessible label (aria-label and title)
1225
+ - `variant?: "filled" | "outlined" | "tonal" | "standard" = "standard"` — Visual style
1226
+ - `shape?: "rounded" | "squared" = "rounded"` — Button shape — rounded (pill, always) or squared (corner radius scales with size: 12px xs/sm, 16px md, 28px lg/xl)
1227
+ - `size?: number | "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — M3's 5-tier icon button sizing (xs:32, sm:40, md:56, lg:96, xl:136), or a custom pixel value
1228
+ - `disabled?: boolean = false` — Disables interaction
1229
+ - `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
1230
+
1231
+ ### MInfiniteScroll
1232
+
1233
+ Wraps a scrollable list and emits load when an IntersectionObserver sentinel at the bottom becomes visible — hand it your own fetch-more logic.
1234
+
1235
+ Props:
1236
+ - `loading?: boolean = false` — Currently loading more items — shows the loading slot
1237
+ - `disabled?: boolean = false` — Disable the load trigger entirely (no observer attached)
1238
+ - `threshold?: number = 100` — Distance in px from the sentinel before it triggers load
1239
+ - `loadingText?: string` — Text shown while loading (defaults to the locale string, 'Loading...')
1240
+ - `endText?: string` — Text shown when ended (defaults to the locale string, 'No more items')
1241
+ - `ended?: boolean = false` — No more items to load — shows the end slot and stops observing
1242
+
1243
+ Events:
1244
+ - `load()` — Emitted when the sentinel scrolls into view and more items should be fetched
1245
+
1246
+ Slots:
1247
+ - `#default` — The content list itself
1248
+ - `#loading` — Custom loading indicator, shown when loading is true
1249
+ - `#end` — Custom end-of-list content, shown when ended is true
1250
+ - `#idle` — Content shown when neither loading nor ended (empty by default)
1251
+
1252
+ ### MJsonEditor
1253
+
1254
+ Import from `@m3ui-vue/m3ui-vue/code-editor`.
1255
+
1256
+ A JSON-aware editor built on top of MCodeEditor — validates as you type and adds format/minify shortcuts.
1257
+
1258
+ Props:
1259
+ - `modelValue: unknown` (v-model) — JSON data (v-model, any valid JSON)
1260
+ - `readonly?: boolean = false` — Read-only mode
1261
+ - `minHeight?: string = "200px"` — Min height
1262
+ - `maxHeight?: string = "600px"` — Max height
1263
+ - `labels?: JsonEditorLabels` — Overrides for the valid/invalid badge and format/minify button text (see `JsonEditorLabels`) — defaults come from useLocale()
1264
+
1265
+ Events:
1266
+ - `update:modelValue(unknown)` — Emitted with the parsed value whenever the text is valid JSON — powers v-model
1267
+
1268
+ ```ts
1269
+ export interface JsonEditorLabels {
1270
+ valid?: string
1271
+ invalid?: string
1272
+ format?: string
1273
+ minify?: string
1274
+ }
1275
+ ```
1276
+
1277
+ ### MJsonViewer
1278
+
1279
+ A read-only, recursively expandable tree view for inspecting JSON-compatible data.
1280
+
1281
+ Props:
1282
+ - `data: unknown` — Data to display (any JSON-compatible value)
1283
+ - `rootName?: string = "root"` — Name for the root node
1284
+ - `expandDepth?: number = 2` — Levels to expand by default
1285
+ - `labels?: JsonViewerLabels` — Overrides for the collapsed-node summary text (see `JsonViewerLabels`) — defaults come from useLocale()
1286
+
1287
+ ```ts
1288
+ export interface JsonViewerLabels {
1289
+ elements?: string
1290
+ fields?: string
1291
+ }
1292
+ ```
1293
+
1294
+ ### MKanban
1295
+
1296
+ A drag-and-drop board. Cards lift and follow the pointer, the others make room, and a dashed slot shows where the card will land. Works with a mouse, a finger (long-press a card) and the keyboard; the board scrolls sideways on its own when you drag near its edges.
1297
+
1298
+ Props:
1299
+ - `modelValue: KanbanColumn[]` (v-model) — Columns with their cards (v-model). Required
1300
+ - `emptyText?: string` — Text shown in a column with no cards (defaults to the locale string)
1301
+
1302
+ Events:
1303
+ - `update:modelValue(KanbanColumn[])` — Emitted after a card moves, by pointer or keyboard (v-model)
1304
+ - `cardMove({ cardId: string | number; fromColumn: string | number; toColumn: string | number; toIndex: number; })` — Emitted alongside update:modelValue with where the card went. Not emitted when a card is dropped back where it was
1305
+ - `cardClick({ card: KanbanCard; columnId: string | number; })` — Emitted when a card is clicked or Enter is pressed on it. Not emitted at the end of a drag
1306
+
1307
+ Slots:
1308
+ - `#card { card: KanbanCard; column: KanbanColumn; dragging: boolean; }` — Content of each card. column is the full KanbanColumn; dragging is true while the card is lifted. Buttons, links and inputs inside keep working: they never start a drag or fire cardClick. Add data-kanban-action to any other element (a badge, a span) to give it the same treatment, so a click there can do something else instead of opening the card
1309
+ - `#column-header { column: KanbanColumn; count: number; }` — Replaces the default header (color dot, title and count)
1310
+ - `#column-footer { column: KanbanColumn; }` — Content below each column's cards, e.g. an "Add card" button
1311
+
1312
+ ```ts
1313
+ export interface KanbanColumn {
1314
+ id: string | number
1315
+ title: string
1316
+ cards: KanbanCard[]
1317
+ color?: 'primary' | 'secondary' | 'tertiary' | 'error' | 'success'
1318
+ /** Optional WIP limit: the header shows count/limit and turns error-colored when exceeded. */
1319
+ limit?: number
1320
+ }
1321
+ ```
1322
+
1323
+ ```ts
1324
+ export interface KanbanCard {
1325
+ id: string | number
1326
+ [key: string]: any
1327
+ }
1328
+ ```
1329
+
1330
+ ### MKbd
1331
+
1332
+ Displays a keyboard shortcut as styled key chips. Purely presentational — pairs well with MHotkeys or MCommandPalette to show the shortcut that triggers an action.
1333
+
1334
+ Props:
1335
+ - `keys: string | string[]` — A '+'-delimited string ("Ctrl+Shift+K") or an array of keys (['Ctrl', 'Shift', 'K']).
1336
+ - `size?: "sm" | "md" | "lg" = "md"` — Key chip size
1337
+ - `separator?: string = "+"` — Separator rendered between keys
1338
+
1339
+ ### MLightbox
1340
+
1341
+ A full-screen image viewer in the style of Google Photos. Images grow out of the picture you tapped and shrink back into it, you swipe between them with the next one already in view, zoom with a double tap or a pinch, and drag one down to close. Tapping the image hides the bars. Wrap your content and it finds the `<img>` elements by itself, or pass items.
1342
+
1343
+ Props:
1344
+ - `modelValue?: boolean = false` (v-model) — v-model — open/closed state
1345
+ - `items?: LightboxItem[]` — Explicit gallery. Omit it to auto-detect `<img>` elements rendered in the default slot instead.
1346
+ - `index?: number = 0` (v-model:index) — v-model:index — current image index
1347
+ - `loop?: boolean = true` — Wrap around when navigating past the first/last image
1348
+ - `closeLabel?: string` — Overrides the close button aria-label (defaults to the active locale)
1349
+ - `showThumbnails?: boolean = false` — Show a row of clickable thumbnails at the bottom for jumping directly to an image.
1350
+ - `rounded?: boolean = true` — Round the corners of the opened image.
1351
+ - `zoom?: boolean = true` — Allow zooming (double tap / double click, pinch, wheel, + and - keys).
1352
+ - `maxZoom?: number = 4` — Largest zoom factor.
1353
+
1354
+ Events:
1355
+ - `update:modelValue(boolean)` — Fires when the lightbox opens or closes
1356
+ - `update:index(number)` — Fires whenever the current index changes (next/prev/goTo/auto-detected image click)
1357
+ - `change(index: number)` — Fires alongside update:index with the new index
1358
+
1359
+ Slots:
1360
+ - `#default` — Content to scan for `<img>` elements when items is not given
1361
+ - `#actions { item: LightboxItem; index: number; }` — Extra buttons in the top bar (download, share, info…).
1362
+
1363
+ Exposed (template ref):
1364
+ - `open: (i?: number, sourceEl?: HTMLElement | undefined) => void`
1365
+ - `close: () => void`
1366
+ - `next: () => void`
1367
+ - `prev: () => void`
1368
+
1369
+ ```ts
1370
+ export interface LightboxItem {
1371
+ src: string
1372
+ alt?: string
1373
+ caption?: string
1374
+ }
1375
+ ```
1376
+
1377
+ ### MList
1378
+
1379
+ A vertical list container (MList) with rich, flexible rows (MListItem) and optional section headers (MListSubheader) — one-line to three-line items, leading/trailing elements, selection, navigation, segmented, and expandable variants.
1380
+
1381
+ Props:
1382
+ - `dense?: boolean = false` — Compact vertical padding on child items
1383
+ - `dividers?: boolean | "inset" = false` — Show separators between items — 'inset' aligns the line past a leading icon/avatar
1384
+ - `nav?: boolean = false` — Navigation variant with rounded (pill) active items, ideal for drawers
1385
+ - `segmented?: boolean = false` — Segmented style — items each get an individual rounded background instead of a flat list
1386
+ - `selectable?: boolean = false` — Enable single-item selection — items compare their value prop against selected
1387
+ - `selected?: string | number | null` (v-model:selected) — Currently selected item value (v-model:selected)
1388
+ - `lines?: 1 | 2 | 3` — Default line count for child items that don't set their own lines prop
1389
+
1390
+ Events:
1391
+ - `update:selected(value: string | number | null)` — Fires when a selectable item is clicked (via v-model:selected)
1392
+
1393
+ Slots:
1394
+ - `#default` — MListItem / MListSubheader children
1395
+
1396
+ ### MListDetail
1397
+
1398
+ Material 3's list-detail layout: a list of items and the details of the selected one. When there's room (840px and up, the expanded width class) both panes sit side by side; on smaller screens only one shows, the detail sliding in over the list when you open an item and back out on `back()`. It measures its own width, so it adapts inside a column or a dialog too. Both panes stay mounted, so the list keeps its scroll position. It has no default size: give it a height so each pane scrolls on its own.
1399
+
1400
+ Props:
1401
+ - `showDetail?: boolean = false` (v-model:showDetail) — Whether the detail is the current destination. One-pane layouts show it instead of the list.
1402
+ - `listWidth?: string` — List pane width in the two-pane layout. Defaults to M3's 360px (412px from the large width class).
1403
+
1404
+ Events:
1405
+ - `update:showDetail(boolean)` — Emitted with false when the detail slot calls back()
1406
+
1407
+ Slots:
1408
+ - `#list { twoPane: boolean; }` — The list pane. Scrolls on its own and keeps its scroll position while the detail is open
1409
+ - `#detail { twoPane: boolean; back: () => void; }` — `back()` returns to the list (sets `showDetail` to false).
1410
+
1411
+ ### MListItem
1412
+
1413
+ A row of an MList: headline with optional overline, supporting text, a leading icon, avatar or image, and trailing text, icon, checkbox or switch. It can be a link, be clickable or expand to show nested items.
1414
+
1415
+ Props:
1416
+ - `title?: string` — Primary text (headline)
1417
+ - `overline?: string` — Small label above the title
1418
+ - `subtitle?: string` — Secondary text (line 2)
1419
+ - `description?: string` — Tertiary text (line 3)
1420
+ - `lines?: 1 | 2 | 3` — Number of text lines — auto-detected from which text props/parent MList lines are set when omitted
1421
+ - `icon?: string` — Leading Material Symbol icon
1422
+ - `leading?: ListItemLeading` — Leading element type — auto-resolves to 'icon'/'avatar'/'image' from icon/avatarName/image when omitted
1423
+ - `avatarName?: string` — Name for the avatar (when leading='avatar')
1424
+ - `image?: string` — Image URL (when leading='image')
1425
+ - `iconContainerColor?: "success" | "error" | "primary" | "secondary" | "tertiary"` — Icon container background color (when leading='icon-container')
1426
+ - `trailingIcon?: string` — Trailing icon name
1427
+ - `trailingText?: string` — Trailing text label
1428
+ - `trailing?: ListItemTrailing` — Trailing element type — auto-resolves from trailingIcon/trailingText when omitted
1429
+ - `trailingValue?: boolean` (v-model:trailingValue) — Value for a trailing switch/checkbox (v-model:trailingValue)
1430
+ - `value?: string | number` — Selection value — compared against the parent MList selected prop
1431
+ - `active?: boolean = false` — Force the active/highlighted state regardless of parent list selection
1432
+ - `disabled?: boolean = false` — Disabled state (38% opacity, blocks interaction)
1433
+ - `clickable?: boolean` — Force interactive styling/behavior (auto-true when href, to,
1434
+ - `href?: string` — Link URL — renders the item as an `<a>`
1435
+ - `to?: string | object` — Vue Router destination — renders the item as a router-link
1436
+ - `expandable?: boolean = false` — Show an expand/collapse chevron revealing the #children slot
1437
+ - `expanded?: boolean` (v-model:expanded) — Control the expanded state (v-model:expanded) — otherwise managed internally
1438
+
1439
+ Events:
1440
+ - `click(e: MouseEvent)` — Fires on any click, including on an expandable item (right before it toggles)
1441
+ - `update:trailingValue(value: boolean)` — Fires when a trailing switch/checkbox is toggled (trailing='switch' | 'checkbox')
1442
+ - `update:expanded(value: boolean)` — Fires when an expandable item is toggled open/closed
1443
+
1444
+ Slots:
1445
+ - `#leading` — Custom leading element, replacing the icon/avatar/image/icon-container
1446
+ - `#overline` — Custom overline content, replacing the overline prop
1447
+ - `#default` — Custom content replacing the title/subtitle/description text block
1448
+ - `#children` — Nested content revealed when expandable is set and the item is expanded
1449
+ - `#trailing` — Custom trailing element, replacing the icon/text/switch/checkbox
1450
+
1451
+ ```ts
1452
+ export type ListItemLeading = 'icon' | 'avatar' | 'checkbox' | 'radio' | 'image' | 'icon-container'
1453
+ ```
1454
+
1455
+ ```ts
1456
+ export type ListItemTrailing = 'icon' | 'text' | 'switch' | 'checkbox'
1457
+ ```
1458
+
1459
+ ### MListSubheader
1460
+
1461
+ A small heading that labels a group of items inside an MList.
1462
+
1463
+ Props:
1464
+ - `inset?: boolean = false` — Align with items that have a leading icon (adds left padding)
1465
+
1466
+ Slots:
1467
+ - `#default` — Subheader text/content
1468
+
1469
+ ### MLoadingIndicator
1470
+
1471
+ The M3 Expressive loading indicator — continuously morphs between rounded shapes (soft burst, cookie, pentagon, pill, sunny, oval) via an underdamped spring while slowly rotating. Comes in a plain and a contained (circle-backed) variant.
1472
+
1473
+ Props:
1474
+ - `size?: number = 48` — Overall footprint in px. The active shape sits inset within it (38/48 ratio) unless contained, where it scales to 55% of size.
1475
+ - `contained?: boolean = false` — Wraps the shape in a filled container circle, and recolors the shape to the OnXContainer role instead of the bare X role
1476
+ - `color?: "error" | "primary" | "secondary" | "tertiary" = "primary"` — Active shape (and container, when contained) color
1477
+ - `label?: string` — Aria label for the indicator's status role — falls back to the locale string ('Loading') when omitted
1478
+
1479
+ ### MLoadingOverlay
1480
+
1481
+ A spinner-and-text overlay, either layered on top of a piece of content via the `#content` slot, or covering the whole viewport with `fullscreen`.
1482
+
1483
+ Props:
1484
+ - `visible: boolean` — Show/hide the overlay
1485
+ - `text?: string` — Loading text message shown below the spinner
1486
+ - `fullscreen?: boolean = false` — Cover the entire viewport via Teleport, instead of overlaying just the #content slot
1487
+ - `opaque?: boolean = false` — Solid surface background instead of a translucent, blurred one
1488
+ - `spinnerSize?: number = 40` — Spinner size in px
1489
+
1490
+ Slots:
1491
+ - `#default` — Extra content shown below the spinner/text, in either mode
1492
+ - `#content` — The content the overlay is layered on top of (only used when fullscreen is false)
1493
+
1494
+ ### MMarkdown
1495
+
1496
+ Import from `@m3ui-vue/m3ui-vue/markdown`.
1497
+
1498
+ Renders markdown source as styled HTML — headings, lists, tables, blockquotes, links, and fenced code blocks with optional syntax highlighting, line highlighting, and a copy button.
1499
+
1500
+ Props:
1501
+ - `source: string` — Markdown source text
1502
+ - `breaks?: boolean = true` — Convert single newlines to `<br>`
1503
+ - `linkify?: boolean = true` — Auto-detect bare URLs and turn them into links
1504
+
1505
+ ### MMaskField
1506
+
1507
+ A text field with a formatting mask — built-in presets or a custom pattern where `#` stands for a digit.
1508
+
1509
+ Props:
1510
+ - `modelValue: string` (v-model) — Masked value (v-model)
1511
+ - `label: string` — Field label
1512
+ - `mask: string` — Mask pattern (# = digit) or a built-in preset name (see `MaskPreset`)
1513
+ - `variant?: "filled" | "outlined" = "filled"` — Visual style
1514
+ - `error?: boolean` — Error state
1515
+ - `errorLabel?: string` — Error message shown when error is true
1516
+ - `hint?: string` — Hint text
1517
+ - `disabled?: boolean` — Disables the field
1518
+ - `required?: boolean` — Marks as required — adds a red asterisk after the label
1519
+ - `leadingIcon?: string` — Material Symbol icon
1520
+ - `clearable?: boolean = false` — Show clear button
1521
+ - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the outlined border
1522
+ - `debounce?: number = 0` — Delay (ms) before firing the
1523
+
1524
+ Events:
1525
+ - `update:modelValue(string)` — Emitted on every keystroke — powers v-model
1526
+ - `debounced(string)` — Emitted debounce ms after the user stops typing (only when debounce > 0)
1527
+
1528
+ ```ts
1529
+ export type MaskPreset = 'credit-card' | 'phone' | 'date' | 'time' | 'cpf' | 'cnpj' | 'zip'
1530
+ ```
1531
+
1532
+ ### MMasonry
1533
+
1534
+ Pinterest-style column layout that fills the shortest column first. Re-lays out on container resize via `ResizeObserver` and when the slotted content changes.
1535
+
1536
+ Props:
1537
+ - `cols?: number = 2` — Default column count
1538
+ - `smCols?: number` — Columns at sm breakpoint (640px)
1539
+ - `mdCols?: number` — Columns at md breakpoint (768px)
1540
+ - `lgCols?: number` — Columns at lg breakpoint (1024px)
1541
+ - `gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "md"` — Gap between items
1542
+
1543
+ Slots:
1544
+ - `#default` — The items, laid out in columns.
1545
+
1546
+ ### MMenu
1547
+
1548
+ A trigger-based dropdown menu, composed with `MMenuItem` and `MMenuDivider`. Items support unlimited-depth nested submenus via the `#children` slot.
1549
+
1550
+ Props:
1551
+ - `align?: "right" | "left" = "right"` — Which edge of the trigger the dropdown aligns to.
1552
+ - `submenuMode?: "push" | "flyout" = "flyout"` — How items with a `#children` slot behave. `'flyout'` opens a hover-positioned side panel (desktop). `'push'` replaces the panel's own content with the submenu and a back header — no positioning math, works with touch. Useful for mobile.
1553
+ - `variant?: "standard" | "expressive" = "standard"` — 'standard' is M3's baseline menu (4dp corners). 'expressive' is M3's rounder 'vertical menu' styling (16dp corners) — combine with `<MMenuDivider gap />` to split the panel into independently-rounded groups with a visible gap, instead of a plain divider line.
1554
+
1555
+ Slots:
1556
+ - `#trigger { open: boolean; }` — The element that opens the menu when clicked; `open` tells whether it's open.
1557
+ - `#default { close: () => void; }` — The menu's items (MMenuItem, MMenuDivider or your own markup); `close()` closes the menu.
1558
+
1559
+ Exposed (template ref):
1560
+ - `close: () => void`
1561
+ - `open: boolean`
1562
+
1563
+ ### MMenuDivider
1564
+
1565
+ A line between groups of items in an MMenu or MContextMenu; with `gap` in an expressive menu it splits the menu into separate rounded groups.
1566
+
1567
+ Props:
1568
+ - `gap?: boolean = false` — Marks this as a group boundary for `MMenu`/`MContextMenu`'s `variant="expressive"` — instead of rendering this divider in place, the parent menu splits its panel into two independently-rounded group boxes with a small gap between them. Has no effect outside an `expressive` menu, where it renders as a normal divider line.
1569
+
1570
+ ### MMenuItem
1571
+
1572
+ An item of an MMenu or MContextMenu: icon, label and a shortcut hint. Put more items in its `#children` slot to make it open a submenu.
1573
+
1574
+ Props:
1575
+ - `icon?: string` — Material Symbol icon name
1576
+ - `shortcut?: string` — Keyboard shortcut hint displayed on the right (e.g. "Ctrl+C") — hidden when the item has #children
1577
+ - `to?: string | Record<string, any>` — Vue Router destination — renders as RouterLink instead of button
1578
+ - `disabled?: boolean = false` — Disables the item
1579
+ - `danger?: boolean = false` — Danger/destructive styling (error color)
1580
+ - `keepOpen?: boolean = false` — Keep the menu open after this item is clicked (e.g. checkable/toggle items).
1581
+
1582
+ Events:
1583
+ - `click()` — Emitted when a leaf item (no #children) is clicked. Not emitted for disabled items or for items with #children, since clicking those just opens/toggles the submenu instead.
1584
+
1585
+ Slots:
1586
+ - `#default` — Item label text.
1587
+ - `#children` — Nested submenu items. In the parent MMenu's default 'flyout' mode, clicking or hovering (mouse only) the item opens a side panel — supports unlimited nesting depth. In 'push' mode, clicking the item instead swaps the whole menu panel to the submenu with a back header; hover does nothing.
1588
+
1589
+ ### MMultiAutocomplete
1590
+
1591
+ Multi-value autocomplete with inline search. Type to filter, Enter to toggle, Backspace to remove last chip.
1592
+
1593
+ Props:
1594
+ - `modelValue: unknown[] = []` (v-model) — Selected values (v-model)
1595
+ - `options: MultiSelectOption[]` — The options to choose from; see `MultiSelectOption`.
1596
+ - `label?: string` — Floating label text
1597
+ - `placeholder?: string` — Input placeholder
1598
+ - `variant?: "filled" | "outlined" = "filled"` — Field style
1599
+ - `mode?: "docked" | "modal" = "docked"` — Dropdown mode: docked (inline) or modal (dialog)
1600
+ - `disabled?: boolean = false` — Disables the field
1601
+ - `error?: boolean` — Error state
1602
+ - `errorLabel?: string` — Error message shown when error is true
1603
+ - `hint?: string` — Helper text below field
1604
+ - `required?: boolean = false` — Marks as required — adds a red asterisk after the label
1605
+ - `leadingIcon?: string` — Material Symbol icon name
1606
+ - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the outlined border
1607
+ - `clearable?: boolean = false` — Show a clear-all button
1608
+ - `maxChips?: number = 3` — Max visible chips before "+N"
1609
+ - `noResultsText?: string` — Text when no options match
1610
+ - `hideSelected?: boolean = false` — Remove already-selected options from the dropdown
1611
+ - `debounce?: number = 0` — Delay (ms) before filtering and firing
1612
+
1613
+ Events:
1614
+ - `update:modelValue(unknown[])` — Emitted on selection change — powers v-model
1615
+ - `debounced(string)` — Emitted debounce ms after the user stops typing the search query (only when debounce > 0)
1616
+
1617
+ ### MMultiSelect
1618
+
1619
+ Select multiple values with removable chips and an optional in-dropdown search.
1620
+
1621
+ Props:
1622
+ - `modelValue: unknown[] = []` (v-model) — Selected values (any type — v-model)
1623
+ - `options: MultiSelectOption[]` — The options to choose from; see `MultiSelectOption`.
1624
+ - `label?: string` — Field label
1625
+ - `placeholder?: string` — Placeholder when nothing selected
1626
+ - `variant?: "filled" | "outlined" = "filled"` — Visual style
1627
+ - `mode?: "docked" | "modal" = "docked"` — Dropdown mode: docked (inline) or modal (dialog)
1628
+ - `disabled?: boolean = false` — Disables the field
1629
+ - `error?: boolean` — Error state
1630
+ - `errorLabel?: string` — Error message shown when error is true
1631
+ - `hint?: string` — Hint text below the field
1632
+ - `required?: boolean = false` — Marks as required — adds a red asterisk after the label
1633
+ - `leadingIcon?: string` — Material Symbol shown before the trigger
1634
+ - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the outlined border
1635
+ - `searchable?: boolean = true` — Show search in dropdown
1636
+ - `maxChips?: number = 3` — Max visible chips before "+N"
1637
+ - `clearable?: boolean = false` — Show a clear button to reset all selections
1638
+ - `searchPlaceholder?: string` — Placeholder for search input in dropdown — defaults to the current locale's string
1639
+ - `noResultsText?: string` — Text when no options match search — defaults to the current locale's string
1640
+ - `hideSelected?: boolean = false` — Remove already-selected options from the dropdown
1641
+
1642
+ Events:
1643
+ - `update:modelValue(unknown[])` — Emitted with the new array of selected values.
1644
+
1645
+ Slots:
1646
+ - `#no-results` — Custom content shown in the dropdown when no options match the search query
1647
+
1648
+ ```ts
1649
+ export interface MultiSelectOption {
1650
+ label: string
1651
+ value: unknown
1652
+ disabled?: boolean
1653
+ }
1654
+ ```
1655
+
1656
+ ### MNavigationBar
1657
+
1658
+ A mobile bottom navigation bar with a pill indicator and badge support.
1659
+
1660
+ Props:
1661
+ - `modelValue: string | number` (v-model) — Active item value, v-model
1662
+ - `items: NavBarItem[]` — Array of nav bar items (see `NavBarItem`)
1663
+
1664
+ Events:
1665
+ - `update:modelValue(string | number)` — Emitted when an item is clicked — powers v-model
1666
+
1667
+ ```ts
1668
+ export interface NavBarItem {
1669
+ value: string | number
1670
+ label: string
1671
+ icon: string
1672
+ badge?: number
1673
+ badgeDot?: boolean
1674
+ }
1675
+ ```
1676
+
1677
+ ### MNavigationDrawer
1678
+
1679
+ A slide-out or inline drawer of grouped, badge-able, optionally-nested navigation items — modal (Teleported, scrim-backed) or inline (participates in layout, supports a collapsed icon-only mode).
1680
+
1681
+ Props:
1682
+ - `modelValue: boolean` (v-model) — Open/closed state (v-model)
1683
+ - `selected?: string | number` — Currently selected item value
1684
+ - `sections: DrawerSection[]` — Array of sections (see the types below)
1685
+ - `title?: string` — Drawer header title (ignored if the #header slot is used)
1686
+ - `modal?: boolean = true` — Modal with a Teleported scrim overlay, or an inline sidebar that participates in normal layout flow
1687
+ - `collapsed?: boolean` — Compact mode (72px) showing only icons — inline variant only
1688
+ - `width?: string` — Custom drawer width (e.g. "320px", "25rem"). Defaults to 22.5rem (360px)
1689
+ - `side?: "top" | "right" | "bottom" | "left" = "left"` — Which side the drawer opens from. Top/bottom are only available for the modal variant — the inline variant always renders on left or right.
1690
+
1691
+ Events:
1692
+ - `update:modelValue(boolean)` — Open/closed state for v-model
1693
+ - `select(string | number)` — Fires when an item is clicked — use to track the selected item
1694
+
1695
+ Slots:
1696
+ - `#header` — Custom header content (e.g. profile card, logo). Fully generic, no positioning constraints applied — overrides the title prop.
1697
+ - `#default` — Free content rendered at the end of the scrollable area, after all sections. Use for footers, logout buttons, or any custom content.
1698
+ - `#toggle` — Collapse/expand toggle button area (inline variant only). Renders inside a 72px centered container with a bottom border that aligns with MTopAppBar (64px height). The icon stays anchored in the same position during collapse/expand transitions.
1699
+
1700
+ Exposed (template ref):
1701
+ - `openItems: Record<string | number, boolean>`
1702
+
1703
+ ```ts
1704
+ export interface DrawerItem {
1705
+ value: string | number;
1706
+ label: string;
1707
+ icon?: string;
1708
+ badge?: string | number;
1709
+ disabled?: boolean;
1710
+ to?: string | Record<string, any>;
1711
+ children?: DrawerItem[];
1712
+ iconSize?: number;
1713
+ labelClass?: string;
1714
+ py?: string;
1715
+ click?: () => void;
1716
+ }
1717
+ ```
1718
+
1719
+ ```ts
1720
+ export interface DrawerSection {
1721
+ title?: string;
1722
+ icon?: string;
1723
+ items: DrawerItem[];
1724
+ collapsible?: boolean;
1725
+ }
1726
+ ```
1727
+
1728
+ ### MNavigationRail
1729
+
1730
+ Compact vertical navigation for desktop/tablet layouts with a pill indicator, an optional wide "expanded" state, and an optional modal (flyout) variant.
1731
+
1732
+ Props:
1733
+ - `modelValue: string | number` (v-model) — Active item value, v-model
1734
+ - `items: NavRailItem[]` — Array of rail items (see `NavRailItem`)
1735
+ - `alignment?: "top" | "bottom" | "center" = "top"` — Vertical alignment of items within the rail
1736
+ - `expanded?: boolean = false` (v-model:expanded) — Widens the rail (220px) and shows each item's icon beside its label in a full-width pill, instead of the icon over the label. Toggle it from your own menu button.
1737
+ - `modal?: boolean = false` — Keeps the rail collapsed and opens the expanded rail as a panel over the app, with a scrim, instead of widening in place. It closes on a scrim click, Escape or picking an item, emitting `update:expanded`.
1738
+
1739
+ Events:
1740
+ - `update:modelValue(string | number)` — Emitted when an item is clicked — powers v-model
1741
+ - `update:expanded(boolean)` — Emitted when the modal panel closes (modal mode only) — pair with :expanded for v-model:expanded
1742
+
1743
+ Slots:
1744
+ - `#fab` — A FAB (or MFabMenu) at the top of the rail, above the items.
1745
+
1746
+ ```ts
1747
+ export interface NavRailItem {
1748
+ value: string | number
1749
+ label: string
1750
+ icon: string
1751
+ badge?: number
1752
+ badgeDot?: boolean
1753
+ disabled?: boolean
1754
+ /** Makes the item a link: a vue-router location (rendered as RouterLink), or a URL without vue-router. */
1755
+ to?: ItemLink
1756
+ }
1757
+ ```
1758
+
1759
+ ### MNavigationSuite
1760
+
1761
+ One navigation that adapts to the space, after Material 3's `NavigationSuiteScaffold`: a short navigation bar at the bottom on phones, the same bar with icons beside labels on a phone in landscape, and a navigation rail on the side from tablets up. Give it your destinations and your content; it picks MShortNavigationBar or MNavigationRail by its own size (see useWindowSizeClass) and swaps them without remounting the content. It has no default size, so give it the app's height, e.g. `class="h-dvh"`.
1762
+
1763
+ Props:
1764
+ - `modelValue: string | number` (v-model) — Selected destination (v-model)
1765
+ - `items: NavigationSuiteItem[]` — Destinations, the same shape MNavigationRail and MShortNavigationBar take
1766
+ - `layout?: "auto" | NavigationSuiteLayout = "auto"` — 'auto' picks by the component's own size: compact width → short bar, compact height (a phone in landscape) → short bar with icons beside labels, anything else → rail. Any other value forces that navigation; 'none' hides it
1767
+
1768
+ Events:
1769
+ - `update:modelValue(string | number)` — Emitted when a destination is picked (v-model)
1770
+
1771
+ Slots:
1772
+ - `#default { layout: NavigationSuiteLayout; }` — The app's content. Scrolls on its own, next to or above the navigation.
1773
+ - `#fab` — Primary action (e.g. a FAB): the rail's header, or floating above the bar at the bottom end.
1774
+
1775
+ ```ts
1776
+ export interface NavigationSuiteItem {
1777
+ value: string | number
1778
+ label: string
1779
+ icon: string
1780
+ badge?: number
1781
+ badgeDot?: boolean
1782
+ disabled?: boolean
1783
+ /** Makes the item a link: a vue-router location (rendered as RouterLink), or a URL without vue-router. */
1784
+ to?: ItemLink
1785
+ }
1786
+ ```
1787
+
1788
+ ```ts
1789
+ /** The navigation component in use: a short bar (icons over labels, or beside them), or a rail. */
1790
+ export type NavigationSuiteLayout = 'bar' | 'bar-medium' | 'rail' | 'rail-expanded' | 'none'
1791
+ ```
1792
+
1793
+ ### MNumberField
1794
+
1795
+ A numeric text field with +/- stepper buttons, min/max clamping, and keyboard arrow support.
1796
+
1797
+ Props:
1798
+ - `modelValue: number | null = null` (v-model) — Bound numeric value (v-model)
1799
+ - `label: string` — Field label
1800
+ - `variant?: "filled" | "outlined" = "filled"` — Visual style
1801
+ - `min?: number` — Minimum allowed value
1802
+ - `max?: number` — Maximum allowed value
1803
+ - `step?: number = 1` — Increment/decrement step
1804
+ - `error?: boolean` — Error state
1805
+ - `errorLabel?: string` — Error message shown when error is true
1806
+ - `hint?: string` — Hint text
1807
+ - `disabled?: boolean` — Disables the field
1808
+ - `required?: boolean` — Marks as required — adds a red asterisk after the label
1809
+ - `leadingIcon?: string` — Material Symbol icon
1810
+ - `stepper?: boolean = true` — Show +/- buttons
1811
+ - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the outlined border
1812
+ - `debounce?: number = 0` — Delay (ms) before firing the
1813
+
1814
+ Events:
1815
+ - `update:modelValue(number | null)` — Emitted on every change — typing, stepper clicks, or arrow keys — powers v-model
1816
+ - `debounced(number | null)` — Emitted debounce ms after the user stops typing (only when debounce > 0). Stepper clicks/arrow keys still emit instantly
1817
+
1818
+ ### MOverlay
1819
+
1820
+ Full-screen overlay with scrim and teleport to body. A generic low-level building block — content is entirely up to you via the default slot.
1821
+
1822
+ Props:
1823
+ - `modelValue?: boolean = true` (v-model) — Controls visibility (v-model)
1824
+ - `scrim?: boolean = true` — Show dark backdrop
1825
+ - `zIndex?: number = 50` — Z-index value
1826
+
1827
+ Events:
1828
+ - `update:modelValue(value: boolean)` — Emitted with false when the scrim is clicked, for v-model support
1829
+
1830
+ Slots:
1831
+ - `#default` — Content shown over the scrim.
1832
+
1833
+ ### MPageProgress
1834
+
1835
+ A thin bar pinned to the top or bottom edge of the viewport, for page/route-level loading state — auto-wired to vue-router by default, or driven entirely by hand via usePageProgress().
1836
+
1837
+ Props:
1838
+ - `color?: "error" | "primary" | "secondary" | "tertiary" = "primary"` — Bar color
1839
+ - `thickness?: number = 3` — Bar height in px
1840
+ - `auto?: boolean = true` — Auto-wire to vue-router's navigation guards when a router is detected. Set to `false` to drive it entirely by hand via `usePageProgress()`.
1841
+ - `position?: "top" | "bottom" = "top"` — Which edge of the viewport the bar is pinned to
1842
+
1843
+ ### MPagination
1844
+
1845
+ Simple previous/next page navigation with an automatically computed page range label. Its texts (“1–10 of 25”, “Page 1 of 3” and the buttons’ labels) come from the app’s locale.
1846
+
1847
+ Props:
1848
+ - `page: number` (v-model:page) — Current page (1-based)
1849
+ - `perPage: number` — Items per page
1850
+ - `total: number` — Total number of items
1851
+
1852
+ Events:
1853
+ - `update:page(number)` — Emitted when the previous/next button is clicked — drive page with it for v-model-style two-way binding
1854
+
1855
+ ### MPasswordMeter
1856
+
1857
+ A password strength bar. Scores length + character variety (0-4) and emits `score` so you can gate a submit button on it.
1858
+
1859
+ Props:
1860
+ - `value: string` — Password to score
1861
+ - `labels?: string[] = ["Very weak", "Weak", "Fair", "Good", "Strong"]` — 5 labels, weakest to strongest.
1862
+ - `minLength?: number = 8` — Length considered "long enough" — also used (+4) as the "very long" bonus threshold.
1863
+
1864
+ Events:
1865
+ - `score(number)` — Emitted whenever value changes — -1 for an empty value, or 0-4 otherwise
1866
+
1867
+ ### MPinInput
1868
+
1869
+ One box per character for OTP/PIN/verification codes. Typing advances to the next box, backspace on an empty box goes back, and pasting a full code fills every box at once.
1870
+
1871
+ Props:
1872
+ - `modelValue: string = ""` (v-model) — Bound code (v-model), e.g. "1234"
1873
+ - `length?: number = 6` — Number of boxes (ignored when groups is set)
1874
+ - `groups?: number[]` — Segment sizes for a grouped layout, e.g. [2, 4, 2, 3, 1, 3] renders `__ ____ __ ___ _ ___`. Overrides `length` (derived as the sum).
1875
+ - `separator?: string = "-"` — Visual separator rendered between groups (only used when `groups` is set).
1876
+ - `type?: "numeric" | "alphanumeric" = "numeric"` — Restricts which characters are accepted
1877
+ - `masked?: boolean = false` — Renders each box as a password field (dots instead of characters)
1878
+ - `variant?: "filled" | "outlined" = "filled"` — Visual style
1879
+ - `error?: boolean` — Error state
1880
+ - `errorLabel?: string` — Error message shown when error is true
1881
+ - `hint?: string` — Hint text below the boxes
1882
+ - `disabled?: boolean = false` — Disables every box
1883
+ - `autoFocus?: boolean = false` — Focuses the first box on mount
1884
+ - `label?: string` — aria-label for the group of boxes
1885
+
1886
+ Events:
1887
+ - `update:modelValue(string)` — Emitted on every box change — powers v-model
1888
+ - `complete(string)` — Fires once with the full code as soon as every box is filled — the natural place to trigger auto-submit
1889
+
1890
+ ### MProgressBar
1891
+
1892
+ A linear progress indicator — determinate, indeterminate, or the M3 Expressive wavy variant.
1893
+
1894
+ Props:
1895
+ - `value?: number` — Progress 0–100 (omit for indeterminate)
1896
+ - `indeterminate?: boolean` — Indeterminate animation — also implied by omitting value
1897
+ - `color?: "error" | "primary" | "secondary" | "tertiary" = "primary"` — Bar color
1898
+ - `variant?: "wavy" | "linear" = "linear"` — Bar style
1899
+ - `label?: string` — Label text above the bar
1900
+ - `thickness?: number` — Stroke width in px. Defaults to 4dp, matching the real M3 token for both variants.
1901
+
1902
+ ### MPullToRefresh
1903
+
1904
+ Wraps its own scrollable container and fires a refresh event when the user pulls past a threshold at the very top of the scroll.
1905
+
1906
+ Props:
1907
+ - `refreshing?: boolean = false` — Controlled loading state — set it to true in your
1908
+ - `disabled?: boolean = false` — Disables the pull gesture
1909
+ - `threshold?: number = 64` — Pull distance in px required to trigger a refresh on release
1910
+ - `size?: number = 36` — Indicator size in px
1911
+ - `color?: "error" | "primary" | "secondary" | "tertiary" = "primary"` — Indicator color
1912
+
1913
+ Events:
1914
+ - `refresh()` — Emitted when the user drags past threshold and releases. Set refreshing to true in the handler, then back to false once the fetch resolves.
1915
+
1916
+ Slots:
1917
+ - `#default` — The scrollable content. A pull starts only when it's scrolled to the top; otherwise touch scrolls it normally
1918
+
1919
+ ### MQRCode
1920
+
1921
+ Import from `@m3ui-vue/m3ui-vue/qrcode`.
1922
+
1923
+ Renders a QR code as inline SVG — crisp at any size, no canvas or image assets. Available from the `/qrcode` entry point, so it never adds weight to the main bundle.
1924
+
1925
+ Props:
1926
+ - `value: string` — Data to encode. Required — there is no default.
1927
+ - `size?: number = 200` — Width/height in pixels (square)
1928
+ - `margin?: number = 4` — Quiet zone around the code, in modules.
1929
+ - `errorCorrectionLevel?: "M" | "L" | "Q" | "H" = "M"` — Higher levels tolerate more damage/obstruction at the cost of a denser code
1930
+ - `color?: string = "#000000"` — Dark module color
1931
+ - `background?: string = "#ffffff"` — Light module / background color
1932
+ - `label?: string` — aria-label for the svg. Defaults to value
1933
+ - `rounded?: boolean = true` — Rounds the outer container corners.
1934
+ - `moduleStyle?: "square" | "dots" = "square"` — 'square' is the classic scannable pixel grid. 'dots' rounds each module — still fully scannable, just a softer look.
1935
+
1936
+ Slots:
1937
+ - `#error` — Shown instead of the SVG when value is too large to encode at the given errorCorrectionLevel
1938
+
1939
+ ### MRadio
1940
+
1941
+ A single radio button, for when you lay out the options yourself. It's selected when `modelValue` equals its `value`; for a plain list of options, MRadioGroup is simpler.
1942
+
1943
+ Props:
1944
+ - `modelValue: unknown` (v-model) — The group's current value (v-model); share one ref between the radios of a group.
1945
+ - `value: unknown` — The value this radio stands for; selecting it sets the v-model to it.
1946
+ - `label?: string` — Text next to the radio. Clicking it selects the radio too.
1947
+ - `disabled?: boolean = false` — Grays the radio out and ignores clicks.
1948
+ - `color?: "error" | "primary" | "secondary" | "tertiary" = "primary"` — Color role of the selected radio.
1949
+
1950
+ Events:
1951
+ - `update:modelValue(unknown)` — Emitted with `value` when the radio is selected.
1952
+
1953
+ ### MRadioGroup
1954
+
1955
+ A group of radio buttons sharing a single selection, column or row layout.
1956
+
1957
+ Props:
1958
+ - `modelValue: unknown` (v-model) — Selected value (v-model)
1959
+ - `options: Option[]` — Radio options
1960
+ - `label?: string` — Group label
1961
+ - `direction?: "row" | "column" = "column"` — Layout direction
1962
+ - `disabled?: boolean = false` — Disables all radios
1963
+ - `color?: "error" | "primary" | "secondary" | "tertiary" = "primary"` — Radio color
1964
+
1965
+ Events:
1966
+ - `update:modelValue(unknown)` — Emitted with the selected option's value.
1967
+
1968
+ ```ts
1969
+ interface Option {
1970
+ label: string
1971
+ value: unknown
1972
+ disabled?: boolean
1973
+ }
1974
+ ```
1975
+
1976
+ ### MRating
1977
+
1978
+ A star rating input with half increments and any Material Symbol icon. Not part of the official M3 spec, so it's built from M3 primitives: filled/outlined icon pairs, a state layer on hover/press, and a focus ring. Click or drag to rate (drag past the first icon to clear), or use the arrow keys, Home and End when focused.
1979
+
1980
+ Props:
1981
+ - `modelValue: number` (v-model) — Current rating (v-model)
1982
+ - `max?: number = 5` — Maximum stars
1983
+ - `size?: number = 28` — Star size in px
1984
+ - `readonly?: boolean` — Display-only: not focusable, exposed as role="img" with the value as its label
1985
+ - `disabled?: boolean` — Disables interaction
1986
+ - `color?: string = "primary"` — One of the 4 M3 roles ('primary' | 'secondary' | 'tertiary' | 'error'), or any other CSS color string
1987
+ - `icon?: string = "star"` — Material Symbol icon
1988
+ - `halfIncrements?: boolean = false` — Allow half-star values (click the left half of an icon). Fractional values always render exactly, with or without this prop
1989
+
1990
+ Events:
1991
+ - `update:modelValue(number)` — Emitted when the user rates by click, drag or keyboard (v-model). Dragging past the first icon emits 0
1992
+
1993
+ ### MRelative
1994
+
1995
+ Wrapper that sets `position: relative` on a container. Use it as the positioning parent for MAbsolute children.
1996
+
1997
+ Slots:
1998
+ - `#default` — Content; absolutely positioned children are placed relative to it.
1999
+
2000
+ ### MRelativeTime
2001
+
2002
+ Renders a timestamp as human-readable relative text ("5 minutes ago", "in 2 hours") that keeps itself up to date, formatted with the native Intl.RelativeTimeFormat. It renders a semantic `<time>` element, and hovering it shows the full absolute date.
2003
+
2004
+ Props:
2005
+ - `value: string | number | Date` — Required. The timestamp to format: an ISO string, epoch milliseconds, or a Date
2006
+ - `locale?: string` — BCP-47 locale tag (e.g. 'es-ES'). Defaults to the app's locale (via createM3UI/useLocale), then the browser's locale.
2007
+
2008
+ ### MResponsive
2009
+
2010
+ Shows or hides content at specific breakpoints using pure CSS (Tailwind's `hidden`/`block` utilities) — no JS resize listener.
2011
+
2012
+ Props:
2013
+ - `show?: Breakpoint` — Show content only at this breakpoint range
2014
+ - `hide?: Breakpoint` — Hide content at this breakpoint range
2015
+ - `tag?: string = "div"` — HTML tag to render
2016
+
2017
+ Slots:
2018
+ - `#default` — Content.
2019
+
2020
+ ```ts
2021
+ type Breakpoint = 'sm-up' | 'md-up' | 'lg-up' | 'xl-up' | 'sm-down' | 'md-down' | 'lg-down' | 'xl-down'
2022
+ ```
2023
+
2024
+ ### MResult
2025
+
2026
+ A full result screen for the end of a flow: success, errors, empty states and HTTP error pages. Each status comes with its own icon, colors, title and description, and you can override any of them. The default texts come from the active locale (`useLocale`), so they follow the language passed to `createM3UI({ locale })`.
2027
+
2028
+ Props:
2029
+ - `status: "info" | "success" | "warning" | "error" | "404" | "403" | "500"` — Required. Picks the icon, its colors, and the default title/description. The three HTTP statuses also show the code in large type above the icon
2030
+ - `title?: string` — Custom title, replaces the status default
2031
+ - `description?: string` — Custom description, replaces the status default
2032
+
2033
+ Slots:
2034
+ - `#actions` — Action buttons, in a centered row below the description
2035
+ - `#default` — Extra content below the actions row, e.g. a secondary link or fine print
2036
+
2037
+ ### MRichTextEditor
2038
+
2039
+ Import from `@m3ui-vue/m3ui-vue/rich-text-editor`.
2040
+
2041
+ A WYSIWYG editor built on tiptap, with a formatting toolbar covering text styles, lists, alignment, links, and images.
2042
+
2043
+ Props:
2044
+ - `modelValue: string` (v-model) — HTML content (v-model)
2045
+ - `placeholder?: string` — Placeholder text shown on an empty document
2046
+ - `disabled?: boolean = false` — Disables editing
2047
+ - `minHeight?: string = "200px"` — Minimum editor height
2048
+ - `labels?: RichTextEditorLabels` — Object with all toolbar/dialog label overrides for i18n (see `RichTextEditorLabels`) — defaults come from useLocale()
2049
+
2050
+ Events:
2051
+ - `update:modelValue(string)` — Emitted with the editor HTML on every content change — powers v-model
2052
+
2053
+ ```ts
2054
+ export interface RichTextEditorLabels {
2055
+ bold?: string
2056
+ italic?: string
2057
+ underline?: string
2058
+ strikethrough?: string
2059
+ highlight?: string
2060
+ bulletList?: string
2061
+ orderedList?: string
2062
+ blockquote?: string
2063
+ code?: string
2064
+ alignLeft?: string
2065
+ alignCenter?: string
2066
+ alignRight?: string
2067
+ undo?: string
2068
+ redo?: string
2069
+ link?: string
2070
+ image?: string
2071
+ paragraph?: string
2072
+ heading1?: string
2073
+ heading2?: string
2074
+ heading3?: string
2075
+ insertLink?: string
2076
+ insertImage?: string
2077
+ imageUrlLabel?: string
2078
+ cancel?: string
2079
+ insert?: string
2080
+ }
2081
+ ```
2082
+
2083
+ ### MScheduler
2084
+
2085
+ A week or day calendar grid. Events sit at their exact times, overlapping ones share the width, and anything that lasts all day or spans several days runs across the all-day row. Click a day header to open that day. Dates and times follow the app's locale.
2086
+
2087
+ Props:
2088
+ - `events?: SchedulerEvent[] = []` — Events to show (see `SchedulerEvent`)
2089
+ - `view?: "week" | "day" = "week"` (v-model:view) — 'week' or 'day'; use v-model:view to follow the header's toggle.
2090
+ - `date?: string` (v-model:date) — The date shown (`YYYY-MM-DD`), today by default; use v-model:date to follow navigation.
2091
+ - `startHour?: number = 7` — First visible hour
2092
+ - `endHour?: number = 22` — Hour the grid ends at
2093
+ - `weekStartsOn?: 0 | 1 = 1` — First day of the week: 0 = Sunday, 1 = Monday.
2094
+ - `hourHeight?: number = 56` — Height of one hour row, in px.
2095
+ - `nowIndicator?: boolean = true` — A line across today's column at the current time.
2096
+ - `locale?: string` — Locale for dates and times (Intl). Falls back to the app's configured locale
2097
+ - `prevLabel?: string` — Aria label of the previous button (defaults to the locale string)
2098
+ - `nextLabel?: string` — Aria label of the next button (defaults to the locale string)
2099
+ - `todayLabel?: string` — Label of the Today button (defaults to the locale string)
2100
+ - `dayViewLabel?: string` — Label of the Day toggle (defaults to the locale string)
2101
+ - `weekViewLabel?: string` — Label of the Week toggle (defaults to the locale string)
2102
+ - `allDayLabel?: string` — Label of the all-day row (defaults to the locale string)
2103
+
2104
+ Events:
2105
+ - `eventClick(SchedulerEvent)` — An event (in the grid or the all-day row) was clicked
2106
+ - `slotClick({ date: string; hour: number; })` — An empty spot in the grid was clicked
2107
+ - `update:date(string)` — Navigation changed the date shown (YYYY-MM-DD)
2108
+ - `update:view("week" | "day")` — The Day/Week toggle (or a day header) changed the view
2109
+
2110
+ Slots:
2111
+ - `#event { event: SchedulerEvent; allDay: boolean; }` — Content of an event block.
2112
+
2113
+ ```ts
2114
+ export interface SchedulerEvent {
2115
+ id: string | number
2116
+ title: string
2117
+ /**
2118
+ * Start: a datetime (`2026-10-17T09:30`, or ISO with a zone). For an all-day event, a date
2119
+ * (`2026-10-17`).
2120
+ */
2121
+ start: string
2122
+ /** End: a datetime (exclusive). For an all-day event, the last day (inclusive). */
2123
+ end: string
2124
+ /** Shown in the all-day row instead of the time grid. Events that span days go there too. */
2125
+ allDay?: boolean
2126
+ color?: 'primary' | 'secondary' | 'tertiary' | 'error' | 'success'
2127
+ }
2128
+ ```
2129
+
2130
+ ### MScrollable
2131
+
2132
+ A constrained scroll area — vertical, horizontal, or both directions.
2133
+
2134
+ Props:
2135
+ - `direction?: "horizontal" | "vertical" | "both" = "vertical"` — Scroll direction
2136
+ - `height?: string` — Fixed height (CSS value)
2137
+ - `maxHeight?: string` — Maximum height (CSS value)
2138
+
2139
+ Slots:
2140
+ - `#default` — The scrolling content.
2141
+
2142
+ ### MSearchBar
2143
+
2144
+ A collapsed search field that expands into a docked panel or a fullscreen overlay, with results shown below the input.
2145
+
2146
+ Props:
2147
+ - `modelValue?: string = ""` (v-model) — Search query (v-model)
2148
+ - `expanded?: boolean` (v-model:expanded) — Controls the expanded/collapsed state — also works uncontrolled if omitted.
2149
+ - `placeholder?: string` — Defaults to the locale's "Search..."
2150
+ - `variant?: "docked" | "fullscreen" = "docked"` — 'docked' grows into a rounded panel anchored below the bar (default). 'fullscreen' takes over the whole viewport, matching M3's mobile search pattern — the leading icon becomes a back button either way.
2151
+ - `leadingIcon?: string = "search"` — Icon shown in the collapsed bar
2152
+ - `iconPosition?: "start" | "end" = "start"` — Which side of the *collapsed* bar the leading icon sits on. The expanded panel's back button always stays at the start regardless — that's a near-universal "go back" convention.
2153
+ - `textAlign?: "center" | "start" = "start"` — Centers the input/placeholder text instead of the M3-standard start alignment (an iOS-style look some apps use for the collapsed bar).
2154
+ - `loading?: boolean = false` — Shows a spinner in the expanded header instead of the clear button
2155
+ - `clearable?: boolean = true` — Shows a clear (×) button once there is a query
2156
+ - `disabled?: boolean = false` — Disables the collapsed bar
2157
+
2158
+ Events:
2159
+ - `update:modelValue(string)` — Emitted on every input change — powers v-model
2160
+ - `search(string)` — Emitted when Enter is pressed in the input, with the current query
2161
+ - `update:expanded(boolean)` — Emitted when the expanded state changes — powers v-model:expanded
2162
+
2163
+ Slots:
2164
+ - `#leading` — Overrides the collapsed bar's leading icon
2165
+ - `#trailing` — Trailing content in both the collapsed bar and the expanded header (e.g. an avatar)
2166
+ - `#default` — Results/suggestions content, shown below the input while expanded
2167
+
2168
+ ### MSection
2169
+
2170
+ A titled content section with optional subtitle, header actions, and divider.
2171
+
2172
+ Props:
2173
+ - `title?: string` — Section title text
2174
+ - `subtitle?: string` — Section subtitle text
2175
+ - `divider?: boolean = false` — Show divider below header
2176
+ - `gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "md"` — Gap between header and content
2177
+ - `titleVariant?: TextVariant = "title-large"` — Typography variant for the title
2178
+
2179
+ Slots:
2180
+ - `#title` — Custom title content (overrides title prop)
2181
+ - `#subtitle` — Custom subtitle content (overrides subtitle prop)
2182
+ - `#actions` — Action buttons displayed in the header row
2183
+ - `#default` — Main section content
2184
+
2185
+ ### MSegmentedButton
2186
+
2187
+ A row of joined segments for choosing between a small set of related options — single or multi select.
2188
+
2189
+ Props:
2190
+ - `modelValue: string | number | (string | number)[]` (v-model) — Selected value(s)
2191
+ - `options: SegmentedOption[]` — The options to choose from; see `SegmentedOption`.
2192
+ - `multiSelect?: boolean = false` — Allow multiple selections
2193
+ - `density?: "default" | "compact" | "comfortable" = "default"` — Button density
2194
+ - `color?: "primary" | "secondary" | "tertiary" = "primary"` — Selected segment color
2195
+
2196
+ Events:
2197
+ - `update:modelValue(string | number | (string | number)[])` — Emitted on selection change — powers v-model
2198
+
2199
+ ```ts
2200
+ export interface SegmentedOption {
2201
+ value: string | number
2202
+ label: string
2203
+ icon?: string
2204
+ disabled?: boolean
2205
+ }
2206
+ ```
2207
+
2208
+ ### MSelect
2209
+
2210
+ A single-value dropdown select, docked or as a modal dialog on smaller screens.
2211
+
2212
+ Props:
2213
+ - `modelValue: unknown` (v-model) — Selected value (any type — v-model)
2214
+ - `options: SelectOption[]` — The options to choose from; see `SelectOption`.
2215
+ - `label?: string` — Field label
2216
+ - `placeholder?: string` — Placeholder when no value selected
2217
+ - `variant?: "filled" | "outlined" = "filled"` — Visual style
2218
+ - `mode?: "docked" | "modal" = "docked"` — Dropdown mode: docked (inline) or modal (dialog)
2219
+ - `disabled?: boolean = false` — Disables the select
2220
+ - `error?: boolean` — Error state
2221
+ - `errorLabel?: string` — Error message shown when error is true
2222
+ - `hint?: string` — Hint text below the field
2223
+ - `required?: boolean = false` — Marks as required — adds a red asterisk after the label
2224
+ - `leadingIcon?: string` — Material Symbol shown before the trigger
2225
+ - `clearable?: boolean = false` — Show a clear button to reset the selection
2226
+ - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the outlined border
2227
+ - `noResultsText?: string` — Text shown when options is empty — defaults to the current locale's string
2228
+
2229
+ Events:
2230
+ - `update:modelValue(unknown)` — Emitted with the selected option's value.
2231
+
2232
+ ```ts
2233
+ export interface SelectOption {
2234
+ label: string
2235
+ value: unknown
2236
+ disabled?: boolean
2237
+ }
2238
+ ```
2239
+
2240
+ ### MShader
2241
+
2242
+ A canvas container for hand-written shaders. Give it a GLSL fragment shader (Shadertoy-style — it runs on WebGL2 and works everywhere) and, optionally, a WGSL fragment shader that runs on WebGPU when the browser supports it. `renderer="auto"` picks WebGPU whenever both a `wgsl` source and browser support are present, otherwise it falls back to WebGL2 — so the same component works as a drop-in on old and new browsers alike.
2243
+
2244
+ Props:
2245
+ - `code: string` — GLSL fragment shader body (Shadertoy-style): must define `mainImage(out vec4 fragColor, in vec2 fragCoord)`. Runs on WebGL2. Always required as the compatible baseline.
2246
+ - `wgsl?: string` — Optional WGSL fragment shader module, e.g. `@fragment fn fs_main(@builtin(position) pos: vec4f) ->
2247
+ - `renderer?: ShaderRenderer = "auto"` — Which backend to use. 'auto' picks WebGPU when `wgsl` is set and supported, else WebGL2.
2248
+ - `uniforms?: Record<string, number | number[]>` — Custom uniforms. Keys/shape are locked in at mount time; only values are reactive per frame.
2249
+ - `paused?: boolean` — Freezes the render loop and the shader clock
2250
+ - `pixelRatio?: number` — Device pixel ratio to render at. Defaults to devicePixelRatio, capped at 2 for performance.
2251
+
2252
+ Events:
2253
+ - `error(message: string)` — Emitted on a shader compile/link error, or a WebGPU runtime error
2254
+ - `ready(renderer: "webgpu" | "webgl")` — Emitted once the backend has initialized — which backend ended up driving the canvas
2255
+
2256
+ Slots:
2257
+ - `#loading` — Shown while the backend initializes (default: MSpinner)
2258
+ - `#fallback` — Shown when neither WebGL2 nor WebGPU is available at all
2259
+ - `#error { message: string; }` — Shown on a shader compile/link/runtime error, with the message
2260
+
2261
+ Exposed (template ref):
2262
+ - `canvas: HTMLCanvasElement | null`
2263
+ - `status: ShaderStatus`
2264
+ - `context: () => WebGL2RenderingContext | GPUDevice | null` — Raw WebGL2RenderingContext or GPUDevice, for consumers who want to go beyond the props API.
2265
+ - `pause: () => void`
2266
+ - `play: () => void`
2267
+ - `restart: () => Promise<void>`
2268
+
2269
+ ```ts
2270
+ export type ShaderRenderer = 'auto' | 'webgpu' | 'webgl'
2271
+ ```
2272
+
2273
+ ```ts
2274
+ export type ShaderStatus = 'loading' | 'ready' | 'error' | 'fallback'
2275
+ ```
2276
+
2277
+ ### MShape
2278
+
2279
+ Clips its content — or renders a filled shape with no content — into one of Material 3's 35 real "expressive" shapes. Changing `shape` spring-morphs into the new outline instead of snapping.
2280
+
2281
+ Props:
2282
+ - `shape: "Circle" | "Square" | "Slanted" | "Arch" | "Fan" | "Arrow" | "SemiCircle" | "Oval" | "Pill" | "Triangle" | "Diamond" | "ClamShell" | "Pentagon" | "Gem" | "Sunny" | "VerySunny" | "Cookie4Sided" | "Cookie6Sided" | "Cookie7Sided" | "Cookie9Sided" | "Cookie12Sided" | "Ghostish" | "Clover4Leaf" | "Clover8Leaf" | "Burst" | "SoftBurst" | "Boom" | "SoftBoom" | "Flower" | "Puffy" | "PuffyDiamond" | "PixelCircle" | "PixelTriangle" | "Bun" | "Heart"` — One of M3's 35 named "expressive" shapes (MaterialShapes.kt), e.g. 'Cookie9Sided', 'Heart'.
2283
+ - `fill?: string = "currentColor"` — Fill color used when there's no default slot content to clip (a decorative solid shape). SVG `fill`, not a `background-color` — a `bg-*` Tailwind class on the component itself has no effect here; use `fill` (or a `text-*` class, since the default is `currentColor`).
2284
+ - `animate?: boolean = true` — Spring-morph into the new outline when `shape` changes — false snaps instantly instead.
2285
+ - `speed?: number = 1` — Multiplier on the morph spring's speed (1 = default). Scales stiffness by speed² and the damping coefficient by speed, which time-scales the spring uniformly without changing its character (same amount of overshoot/settle shape, just faster or slower).
2286
+
2287
+ Slots:
2288
+ - `#default` — Content clipped to the shape (an image, an icon, anything). Without it the shape is drawn filled with `fill`.
2289
+
2290
+ ### MShortNavigationBar
2291
+
2292
+ M3 Expressive's shorter navigation bar (64dp, vs. MNavigationBar's classic 80dp) — a genuinely separate component, not just a size variant.
2293
+
2294
+ Props:
2295
+ - `modelValue: string | number` (v-model) — Active item value, v-model
2296
+ - `items: ShortNavBarItem[]` — Array of nav bar items (see `ShortNavBarItem`)
2297
+ - `arrangement?: "centered" | "equal" = "equal"` — 'equal' fills the bar edge to edge (small screens); 'centered' groups items toward the middle instead, recommended for medium/landscape screens
2298
+ - `iconPosition?: "top" | "start" = "top"` — 'top' stacks the icon above the label; 'start' places it beside the label in one wider pill — typically paired with arrangement='centered'
2299
+
2300
+ Events:
2301
+ - `update:modelValue(string | number)` — Emitted when an item is clicked — powers v-model
2302
+
2303
+ ```ts
2304
+ export interface ShortNavBarItem {
2305
+ value: string | number
2306
+ label: string
2307
+ icon: string
2308
+ badge?: number
2309
+ badgeDot?: boolean
2310
+ /** Not selectable: icon and label at 38% of the unselected color, no hover. */
2311
+ disabled?: boolean
2312
+ /** Makes the item a link: a vue-router location (rendered as RouterLink), or a URL without vue-router. */
2313
+ to?: ItemLink
2314
+ }
2315
+ ```
2316
+
2317
+ ### MSideSheet
2318
+
2319
+ A panel that slides in from the right edge of the screen. Supports drag-to-dismiss from its left edge, or tapping the scrim.
2320
+
2321
+ Props:
2322
+ - `modelValue: boolean` (v-model) — Open/closed state (v-model)
2323
+ - `title?: string` — Sheet header title, ignored if the header slot is used
2324
+ - `width?: string = "w-80"` — Tailwind width class for the panel (capped at max-w-[90vw])
2325
+
2326
+ Events:
2327
+ - `update:modelValue(boolean)` — Emitted when the sheet closes (scrim click, drag-to-dismiss from the left edge, or the close button) — powers v-model
2328
+
2329
+ Slots:
2330
+ - `#header` — Replaces the default title text entirely — the close button stays
2331
+ - `#default` — Sheet body content (scrollable)
2332
+ - `#actions` — Footer action buttons, shown in a bordered strip below the content
2333
+
2334
+ ### MSignaturePad
2335
+
2336
+ A bordered canvas that captures pointer strokes for signature capture. There's no v-model, since a signature isn't a simple value — read it out via events or the exposed methods.
2337
+
2338
+ Props:
2339
+ - `width?: number = 400` — Canvas width in px
2340
+ - `height?: number = 200` — Canvas height in px
2341
+ - `lineWidth?: number = 2.5` — Stroke width
2342
+ - `color?: string = "#000000"` — Stroke color
2343
+ - `background?: string = "#ffffff"` — Canvas background color
2344
+ - `variant?: "filled" | "outlined" = "outlined"` — Container border style
2345
+ - `disabled?: boolean = false` — Disables drawing
2346
+
2347
+ Events:
2348
+ - `end(string)` — Fires after a stroke ends, with a PNG data: URL of the canvas
2349
+ - `change(string)` — Fires alongside end, and also after undo() — same data: URL payload
2350
+ - `begin()` — Fires on the first pointerdown of a new stroke
2351
+
2352
+ Exposed (template ref):
2353
+ - `clear: () => void`
2354
+ - `undo: () => void`
2355
+ - `isEmpty: () => boolean`
2356
+ - `toDataURL: (type?: string | undefined, quality?: number | undefined) => string`
2357
+
2358
+ ### MSimpleCarousel
2359
+
2360
+ A scroll-snap image carousel with three fixed-width layouts — hero (one protagonist item with peeking neighbors), multi-browse (several items at once, statically sized), and uncontained (variable-width items, optionally animated by scroll position). For the real M3 multi-browse carousel — where items continuously resize as you scroll instead of snapping between fixed widths — see MCarousel.
2361
+
2362
+ Props:
2363
+ - `items: SimpleCarouselItem[]` — Slides to render — required
2364
+ - `layout?: "multi-browse" | "uncontained" | "hero" = "hero"` — Carousel layout style
2365
+ - `height?: string = "320px"` — Track height
2366
+ - `showArrows?: boolean = true` — Show prev/next arrow buttons (fade in on hover)
2367
+ - `showIndicators?: boolean = true` — Show dot indicators below the track
2368
+ - `autoplay?: boolean = false` — Auto-advance slides — pauses while the pointer is over the carousel
2369
+ - `interval?: number = 5000` — Autoplay interval in ms
2370
+ - `gap?: number = 8` — Gap between items in pixels
2371
+ - `visibleItems?: number = 3` — Number of visible items (multi-browse layout only)
2372
+ - `animated?: boolean = false` — Dynamically grow the centered item and shrink the others while scrolling (uncontained layout only)
2373
+
2374
+ Events:
2375
+ - `change(index: number)` — Fires with the new active item index whenever the track scrolls to a different closest item
2376
+
2377
+ Exposed (template ref):
2378
+ - `next: () => void`
2379
+ - `prev: () => void`
2380
+ - `scrollToItem: (index: number) => void`
2381
+ - `scrollToPage: (page: number) => void`
2382
+
2383
+ ```ts
2384
+ export interface SimpleCarouselItem {
2385
+ src: string
2386
+ alt?: string
2387
+ label?: string
2388
+ supportingText?: string
2389
+ ratio?: number
2390
+ }
2391
+ ```
2392
+
2393
+ ### MSkeleton
2394
+
2395
+ A loading placeholder shape — text, circular, rectangular, or rounded — with pulse or wave animation.
2396
+
2397
+ Props:
2398
+ - `variant?: "rounded" | "text" | "circular" | "rectangular" = "text"` — Skeleton shape
2399
+ - `width?: string` — CSS width (defaults to 100%, or 40px for circular)
2400
+ - `height?: string` — CSS height (defaults to 14px for text, 40px for circular, 100px otherwise)
2401
+ - `lines?: number = 1` — Number of text lines (text variant only) — the last line renders at 60% width
2402
+ - `animation?: "none" | "pulse" | "wave" = "pulse"` — Animation style
2403
+
2404
+ ### MSlider
2405
+
2406
+ The M3 slider — vertical bar thumb, rounded track with gap, standard/centered/range variants, horizontal or vertical.
2407
+
2408
+ Props:
2409
+ - `modelValue: number | [number, number]` (v-model) — Current value — a tuple when variant is range
2410
+ - `min?: number = 0` — Minimum value
2411
+ - `max?: number = 100` — Maximum value
2412
+ - `step?: number = 1` — Step increment
2413
+ - `disabled?: boolean = false` — Disables the slider
2414
+ - `label?: string` — Label text
2415
+ - `showValue?: boolean = false` — Show current value beside label
2416
+ - `showTooltip?: boolean = false` — Show value tooltip while dragging
2417
+ - `orientation?: "horizontal" | "vertical" = "horizontal"` — Slider orientation
2418
+ - `size?: "xs" | "sm" | "md" | "lg" | "xl" = "xs"` — Track and thumb size
2419
+ - `variant?: "standard" | "centered" | "range" = "standard"` — Standard, centered (from middle), or range (two thumbs)
2420
+ - `stops?: boolean = false` — Show stop dots at each step (max 30 visible)
2421
+ - `icon?: string` — Material Symbol icon shown before the slider — hides once the fill reaches it
2422
+ - `color?: "error" | "primary" | "secondary" | "tertiary" = "primary"` — Base color — used for the fill and thumb unless overridden by fillColor/thumbColor
2423
+ - `fillColor?: string` — Custom color (hex, rgb(), a CSS var, etc.) for the filled/active portion of the track and the corner dot. Defaults to `color`'s M3 token.
2424
+ - `thumbIcon?: string` — Replaces the draggable bar thumb with an icon.
2425
+ - `thumbColor?: string` — Custom color (hex, rgb(), a CSS var, etc.) for the thumb (bar or icon). Defaults to `color`'s M3 token.
2426
+
2427
+ Events:
2428
+ - `update:modelValue(number | [number, number])` — Emitted while dragging and on key presses, with the new value (a `[low, high]` pair for the range variant).
2429
+
2430
+ ### MSnackbar
2431
+
2432
+ Renders the toasts shown with `useToast()`. It's mounted for you the first time `useToast()` is called, so you don't place it yourself; its position comes from `useToast().position`.
2433
+
2434
+ Props:
2435
+ - `closeAriaLabel?: string` — Accessible label of each toast's close button. Defaults to the locale's "Close".
2436
+
2437
+ ### MSpacer
2438
+
2439
+ Pushes flex siblings apart — renders a simple `flex: 1` div. Use it inside MFlex/MStack (or any flex container) to push a group of items to the far edge.
2440
+
2441
+ ### MSpinner
2442
+
2443
+ A small circular loading spinner — a standard ring, or the M3 Expressive wavy variant. For a larger, shape-morphing loading affordance, see MLoadingIndicator.
2444
+
2445
+ Props:
2446
+ - `size?: number = 20` — Size in px
2447
+ - `wavy?: boolean = false` — M3 Expressive wavy animation style — the ring rotates while a wave travels along its stroke, instead of a plain spin
2448
+ - `label?: string` — Aria label for the spinner's status role — falls back to the locale string ('Loading') when omitted
2449
+
2450
+ ### MSplitButton
2451
+
2452
+ A button split into a main action and a dropdown toggle — click the main part for the primary action, the arrow for alternatives.
2453
+
2454
+ Props:
2455
+ - `label: string` — Main button label
2456
+ - `icon?: string` — Main button icon
2457
+ - `variant?: "elevated" | "filled" | "outlined" | "tonal" = "tonal"` — Visual style
2458
+ - `color?: "primary" | "secondary" | "tertiary" = "primary"` — Color scheme
2459
+ - `size?: "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — Button size
2460
+ - `disabled?: boolean = false` — Disables both parts
2461
+ - `items?: SplitButtonItem[]` — Dropdown menu items; see `SplitButtonItem`
2462
+
2463
+ Events:
2464
+ - `click(MouseEvent)` — Emitted when the main (left) button is clicked
2465
+
2466
+ Slots:
2467
+ - `#menu { close: () => boolean; }` — Custom dropdown content. Used instead of items. Call close() to dismiss.
2468
+
2469
+ ```ts
2470
+ export interface SplitButtonItem {
2471
+ label: string
2472
+ icon?: string
2473
+ disabled?: boolean
2474
+ onClick?: () => void
2475
+ }
2476
+ ```
2477
+
2478
+ ### MSplitter
2479
+
2480
+ Two resizable panels divided by a draggable handle.
2481
+
2482
+ Props:
2483
+ - `direction?: "horizontal" | "vertical" = "horizontal"` — Split direction
2484
+ - `initialSplit?: number = 50` — Initial split percentage
2485
+ - `min?: number = 10` — Minimum panel percentage
2486
+ - `max?: number = 90` — Maximum panel percentage
2487
+
2488
+ Slots:
2489
+ - `#first` — Content for the first (left/top) panel
2490
+ - `#second` — Content for the second (right/bottom) panel
2491
+
2492
+ ### MSpotlightSearch
2493
+
2494
+ A spotlight-style search overlay. Unlike MCommandPalette, it doesn't filter internally — you own the results array and update it from the search event, which makes it a natural fit for async/remote search.
2495
+
2496
+ Props:
2497
+ - `modelValue: boolean` (v-model) — Open/closed state (v-model). Required — there is no default.
2498
+ - `results?: SpotlightResult[] = []` — Results to render — the component does no filtering itself, it just displays whatever you pass via the search event handler
2499
+ - `placeholder?: string` — Search input placeholder — falls back to the locale's own string when unset
2500
+ - `loading?: boolean = false` — Shows a spinner in place of the clear button, e.g. while an async search is in flight
2501
+ - `noResultsText?: string` — Empty-state text — falls back to the locale's own string when unset
2502
+ - `hotkey?: string = "/"` — Global keyboard shortcut key (no modifier) to open the search — ignored while focus is in a text input/textarea/contenteditable
2503
+ - `debounce?: number = 0` — Delay in ms before the search event fires after the query changes; 0 fires immediately on every keystroke
2504
+ - `navigateHint?: string` — Footer hint text for the arrow keys — falls back to the locale's own string when unset
2505
+ - `openHint?: string` — Footer hint text for Enter — falls back to the locale's own string when unset
2506
+ - `closeHint?: string` — Footer hint text for Escape — falls back to the locale's own string when unset
2507
+
2508
+ Events:
2509
+ - `update:modelValue(boolean)` — Emitted on open/close — powers v-model
2510
+ - `select(SpotlightResult)` — Emitted when a result is chosen (click, or Enter)
2511
+ - `search(string)` — Emitted as the query changes (debounced by the debounce prop) — drive your own filtering and update results in response
2512
+
2513
+ ```ts
2514
+ export interface SpotlightResult {
2515
+ id: string | number
2516
+ title: string
2517
+ description?: string
2518
+ icon?: string
2519
+ category?: string
2520
+ }
2521
+ ```
2522
+
2523
+ ### MStack
2524
+
2525
+ Flex stack with gap, alignment, and optional dividers between items.
2526
+
2527
+ Props:
2528
+ - `direction?: "row" | "column" = "column"` — Stack direction
2529
+ - `gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "md"` — Gap between items (ignored when divider is true)
2530
+ - `align?: "center" | "start" | "end" | "stretch" | "baseline" = "stretch"` — Cross-axis alignment
2531
+ - `justify?: "center" | "start" | "end" | "between" | "around" | "evenly" = "start"` — Main-axis alignment
2532
+ - `wrap?: boolean = false` — Allow items to wrap
2533
+ - `divider?: boolean = false` — Show dividers between items instead of a gap
2534
+ - `inline?: boolean = false` — Use inline-flex
2535
+
2536
+ Slots:
2537
+ - `#default` — The stacked items.
2538
+
2539
+ ### MStatCard
2540
+
2541
+ A compact metric card — title, value, optional icon, and a trend indicator, with a built-in loading skeleton.
2542
+
2543
+ Props:
2544
+ - `title: string` — Stat label text — required
2545
+ - `value: string | number` — Main stat value — required
2546
+ - `icon?: string` — Material Symbol icon shown in a colored container on the right
2547
+ - `trend?: number` — Percentage change — positive shows green/up, negative red/down, zero neutral/flat
2548
+ - `trendLabel?: string` — Text next to the trend indicator (e.g. "vs last month")
2549
+ - `color?: "success" | "error" | "primary" | "secondary" | "tertiary" = "primary"` — Icon container color
2550
+ - `loading?: boolean` — Show a skeleton placeholder instead of the value
2551
+
2552
+ Slots:
2553
+ - `#footer` — Extra content appended after the trend indicator/label row (only rendered when trend, trendLabel, or this slot is present)
2554
+
2555
+ ### MStepper
2556
+
2557
+ A multi-step wizard, horizontal or vertical, with icons, descriptions, and optional/error states.
2558
+
2559
+ Props:
2560
+ - `steps: StepItem[]` — Step definitions (see `StepItem`)
2561
+ - `modelValue: number` (v-model) — Active step index (0-based), v-model
2562
+ - `direction?: "horizontal" | "vertical" = "horizontal"` — Layout direction
2563
+ - `linear?: boolean = true` — When true, steps are not clickable — only the active step changes via v-model from outside. When false, any non-active step can be clicked to jump to it.
2564
+
2565
+ Events:
2566
+ - `update:modelValue(number)` — Emitted with the new current step index.
2567
+
2568
+ ```ts
2569
+ export interface StepItem {
2570
+ label: string
2571
+ description?: string
2572
+ icon?: string
2573
+ optional?: boolean
2574
+ error?: boolean
2575
+ }
2576
+ ```
2577
+
2578
+ ### MSticky
2579
+
2580
+ Sticks content to the top of its scroll container using `position: sticky`.
2581
+
2582
+ Props:
2583
+ - `top?: string | number = 0` — Sticky offset from top (number = px)
2584
+ - `zIndex?: number = 40` — Z-index value
2585
+
2586
+ Slots:
2587
+ - `#default` — The content that sticks.
2588
+
2589
+ ### MSubtitle
2590
+
2591
+ Secondary text component with muted color by default — a thin wrapper around `MText`.
2592
+
2593
+ Props:
2594
+ - `size?: "medium" | "small" | "large" = "large"` — Subtitle size (maps to body-large/medium/small)
2595
+ - `color?: "error" | "primary" | "secondary" | "tertiary" | "on-surface-variant" | "on-surface" | "inherit" = "on-surface-variant"` — Text color
2596
+ - `align?: "right" | "left" | "center"` — Text alignment
2597
+ - `truncate?: boolean` — Truncate text with ellipsis on overflow
2598
+
2599
+ Slots:
2600
+ - `#default` — The subtitle text.
2601
+
2602
+ ### MSupportingPane
2603
+
2604
+ Material 3's supporting pane layout: main content plus a narrower pane that supports it, like related videos next to a player, a cart next to a product or comments next to a document. With room for two panes (840px and up) the supporting pane sits beside the main one; on smaller screens it moves under it, or into a bottom sheet with `single-pane="sheet"`. It measures its own width, not the window's.
2605
+
2606
+ Props:
2607
+ - `singlePane?: "below" | "sheet" = "below"` — Where the supporting pane goes when there's room for only one pane.
2608
+ - `open?: boolean = false` (v-model:open) — With `singlePane="sheet"`: whether the sheet is open (v-model:open).
2609
+ - `sheetTitle?: string` — With `singlePane="sheet"`: the sheet's title.
2610
+ - `supportingWidth?: string` — Supporting pane width in the two-pane layout. Defaults to M3's 360px (412px from the large width class).
2611
+
2612
+ Events:
2613
+ - `update:open(boolean)` — Emitted when the sheet is dismissed, or closed because both panes fit again
2614
+
2615
+ Slots:
2616
+ - `#main { twoPane: boolean; }` — The main content
2617
+ - `#supporting { twoPane: boolean; }` — Content that supports the main pane: related items, a summary, details, tools
2618
+
2619
+ ### MSwitch
2620
+
2621
+ A toggle switch with an optional label, 4 semantic colors, and both M3 icon variants.
2622
+
2623
+ Props:
2624
+ - `modelValue: boolean` (v-model) — Toggle state (v-model)
2625
+ - `disabled?: boolean = false` — Disables the switch
2626
+ - `label?: string` — Label text
2627
+ - `color?: "error" | "primary" | "secondary" | "tertiary" = "primary"` — Track/thumb color when on
2628
+ - `icon?: boolean = true` — Shows a check icon in the thumb while on. Set to `false` for M3's plain switch without an icon.
2629
+
2630
+ Events:
2631
+ - `update:modelValue(boolean)` — Emitted with the new on/off state.
2632
+
2633
+ ### MTable
2634
+
2635
+ A simple, general-purpose data table — sortable columns, built-in search, pagination, and optional row selection, with an escape hatch to delegate all three to your backend via serverSide.
2636
+
2637
+ Props:
2638
+ - `columns: TableColumn[]` — Column definitions: { key, label, sortable?, width?, align? }
2639
+ - `rows: Record<string, any>[]` — Table data rows
2640
+ - `loading?: boolean = false` — Show skeleton loading state
2641
+ - `emptyText?: string` — Text when no rows (defaults to the locale string)
2642
+ - `rowKey?: string = "id"` — Unique key field in each row
2643
+ - `selectable?: boolean = false` — Enable row selection with checkboxes (by default only the checkbox toggles a row; clicking the row itself still emits row-click)
2644
+ - `selectOnRowClick?: boolean = false` — With selectable, clicking anywhere on a row toggles its selection instead of emitting row-click
2645
+ - `modelValue?: Record<string, any>[] = []` (v-model) — Selected rows (v-model)
2646
+ - `perPage?: number = 10` — Rows per page
2647
+ - `searchable?: boolean = true` — Show search input
2648
+ - `serverSide?: boolean = false` — Emit `fetch` instead of filtering locally. Requires :total.
2649
+ - `total?: number = 0` — Total rows (for server-side pagination)
2650
+ - `page?: number = 1` (v-model:page) — Current page (v-model via update:page)
2651
+ - `searchPlaceholder?: string` — Placeholder for search input (defaults to the locale string)
2652
+ - `selectedText?: string` — Text for selected count badge, pluralized with 's' (defaults to the locale string)
2653
+
2654
+ Events:
2655
+ - `update:modelValue(Record<string, any>[])` — Emitted when the selection changes — powers v-model
2656
+ - `update:page(number)` — Emitted when the page changes — powers v-model:page
2657
+ - `rowClick(Record<string, any>)` — Emitted with the row's data when you click a row (unless `selectOnRowClick` makes the click select it).
2658
+ - `fetch(TableFetchParams)` — Emitted instead of filtering locally when serverSide is true
2659
+
2660
+ Slots:
2661
+ - `#toolbar` — Extra content in the toolbar next to the search input (filters, buttons, etc.)
2662
+ - `#empty` — Custom empty-state content, replaces the default icon + text
2663
+ - `#row-actions { row: Record<string, any>; }` — Per-row action buttons — rendering this slot adds a trailing actions column
2664
+
2665
+ ```ts
2666
+ export interface TableFetchParams {
2667
+ page: number
2668
+ perPage: number
2669
+ search: string
2670
+ sortKey: string
2671
+ sortDir: 'asc' | 'desc' | ''
2672
+ }
2673
+ ```
2674
+
2675
+ ```ts
2676
+ export interface TableColumn {
2677
+ key: string
2678
+ label: string
2679
+ sortable?: boolean
2680
+ width?: string
2681
+ align?: 'left' | 'center' | 'right'
2682
+ }
2683
+ ```
2684
+
2685
+ ### MTabs
2686
+
2687
+ Switches between different views or content sections. The indicator animates via two independent springs (offset and width), not a CSS transition — see the component source for details.
2688
+
2689
+ Props:
2690
+ - `modelValue: string | number` (v-model) — Active tab value (v-model)
2691
+ - `tabs: Tab[]` — Tab definitions
2692
+ - `variant?: "primary" | "secondary" = "primary"` — Primary: short sliding underline shorter than the tab with a stretch animation. Secondary: full-width underline spanning the entire tab, text-only.
2693
+ - `scrollable?: boolean = false` — Fixed (default, M3 `TabRow`): tabs evenly share the available width, no scrolling — use for 2-5 tabs. Scrollable (M3 `ScrollableTabRow`): tabs keep their natural width and the row scrolls horizontally when they overflow — use for many tabs.
2694
+
2695
+ Events:
2696
+ - `update:modelValue(string | number)` — Emitted with the value of the tab you picked.
2697
+
2698
+ ```ts
2699
+ interface Tab {
2700
+ value: string | number
2701
+ label: string
2702
+ icon?: string
2703
+ disabled?: boolean
2704
+ }
2705
+ ```
2706
+
2707
+ ### MTagInput
2708
+
2709
+ Type and press Enter or comma to add a free-form tag. Backspace on an empty input removes the last tag.
2710
+
2711
+ Props:
2712
+ - `modelValue: string[] = []` (v-model) — Array of tags (v-model)
2713
+ - `label?: string` — Floating label text
2714
+ - `placeholder?: string` — Input placeholder
2715
+ - `variant?: "filled" | "outlined" = "filled"` — Field style
2716
+ - `disabled?: boolean = false` — Disables the field
2717
+ - `error?: boolean` — Error state
2718
+ - `errorLabel?: string` — Error message shown when error is true
2719
+ - `hint?: string` — Helper text below field
2720
+ - `required?: boolean = false` — Marks as required — adds a red asterisk after the label
2721
+ - `leadingIcon?: string` — Material Symbol icon name
2722
+ - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the outlined border
2723
+ - `maxTags?: number` — Max number of tags allowed
2724
+ - `duplicates?: boolean = false` — Allow duplicate tags
2725
+ - `clearable?: boolean = false` — Show a clear-all button
2726
+ - `debounce?: number = 0` — Delay (ms) before firing the
2727
+
2728
+ Events:
2729
+ - `update:modelValue(string[])` — Emitted whenever a tag is added or removed — powers v-model
2730
+ - `debounced(string[])` — Emitted debounce ms after the tag list stops changing (only when debounce > 0)
2731
+
2732
+ ### MTerminal
2733
+
2734
+ Import from `@m3ui-vue/m3ui-vue/terminal`.
2735
+
2736
+ A terminal emulator built on xterm.js — pre-filled static output, or fully interactive keyboard input.
2737
+
2738
+ Props:
2739
+ - `lines?: string[] = []` — Initial lines to display
2740
+ - `readonly?: boolean = false` — Disable input
2741
+ - `title?: string = "Terminal"` — Title bar text
2742
+ - `minHeight?: string = "300px"` — Minimum height
2743
+
2744
+ Events:
2745
+ - `line(string)` — Emitted with the buffered text once the user presses Enter — the usual event to handle a submitted command
2746
+ - `input(string)` — Emitted for every raw keystroke/data chunk xterm receives (not readonly)
2747
+
2748
+ Exposed (template ref):
2749
+ - `write: (text: string) => any`
2750
+ - `writeln: (text: string) => any`
2751
+ - `clear: () => any`
2752
+ - `focus: () => any`
2753
+
2754
+ ### MText
2755
+
2756
+ Renders any of the 15 Material 3 typography variants, with an auto-selected semantic HTML tag.
2757
+
2758
+ Props:
2759
+ - `variant?: TextVariant = "body-medium"` — Typography variant from the Material 3 type scale
2760
+ - `tag?: string` — HTML tag to render (auto-selected based on variant — h1/h2/h3 for display/headline, p for title/body, span for label)
2761
+ - `color?: "error" | "primary" | "secondary" | "tertiary" | "on-surface-variant" | "on-surface" | "inherit" = "inherit"` — Text color
2762
+ - `align?: "right" | "left" | "center" = "left"` — Text alignment
2763
+ - `truncate?: boolean` — Truncate text with ellipsis on overflow
2764
+ - `lines?: 1 | 2 | 3 | 4 | 5 | 6` — Clamp text to a specific number of lines
2765
+ - `weight?: "medium" | "bold" | "regular"` — Font weight override
2766
+
2767
+ Slots:
2768
+ - `#default` — The text.
2769
+
2770
+ ```ts
2771
+ export type TextVariant =
2772
+ | 'display-large' | 'display-medium' | 'display-small'
2773
+ | 'headline-large' | 'headline-medium' | 'headline-small'
2774
+ | 'title-large' | 'title-medium' | 'title-small'
2775
+ | 'body-large' | 'body-medium' | 'body-small'
2776
+ | 'label-large' | 'label-medium' | 'label-small'
2777
+ ```
2778
+
2779
+ ### MTextField
2780
+
2781
+ The standard single- or multi-line text input, filled or outlined, with floating label.
2782
+
2783
+ Props:
2784
+ - `modelValue: string | number` (v-model) — Bound value (v-model)
2785
+ - `label: string` — Field label
2786
+ - `type?: string = "text"` — HTML input type
2787
+ - `variant?: "filled" | "outlined" = "filled"` — Visual style
2788
+ - `error?: boolean` — Puts the field in error state (red border and label)
2789
+ - `errorLabel?: string` — Error message shown below the field (only visible when error is true)
2790
+ - `hint?: string` — Hint text shown below the field
2791
+ - `disabled?: boolean` — Disables the field
2792
+ - `required?: boolean` — Marks as required — adds a red asterisk after the label
2793
+ - `multiline?: boolean` — Renders a textarea instead of an input
2794
+ - `rows?: number = 3` — Textarea rows (when multiline)
2795
+ - `autocomplete?: string` — Passed through to the native autocomplete attribute
2796
+ - `leadingIcon?: string` — Material Symbol shown before the input
2797
+ - `clearable?: boolean = false` — Show a clear button when the field has a value
2798
+ - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the outlined border
2799
+ - `debounce?: number = 0` — Delay (ms) before firing the
2800
+
2801
+ Events:
2802
+ - `update:modelValue(string)` — Emitted on every keystroke — powers v-model
2803
+ - `debounced(string)` — Emitted debounce ms after the user stops typing (only when debounce > 0)
2804
+
2805
+ Slots:
2806
+ - `#trailing` — Custom trailing content (e.g. an icon button) — replaces the built-in clear button when present
2807
+
2808
+ ### MTimeline
2809
+
2810
+ A vertical event timeline with icon dots, dates, and colors — standard single-column or alternating left/right layout.
2811
+
2812
+ Props:
2813
+ - `items: TimelineItem[]` — Array of timeline entries — required
2814
+ - `dense?: boolean = false` — Compact spacing between items
2815
+ - `alternating?: boolean = false` — Alternate items left/right of a central line instead of a single left-aligned column
2816
+
2817
+ ```ts
2818
+ export interface TimelineItem {
2819
+ title: string;
2820
+ description?: string;
2821
+ date?: string;
2822
+ icon?: string;
2823
+ color?: "primary" | "secondary" | "tertiary" | "error" | "success";
2824
+ dotColor?: string;
2825
+ }
2826
+ ```
2827
+
2828
+ ### MTimePicker
2829
+
2830
+ An inline, dropdown-anchored hour/minute picker with 12h/24h format support.
2831
+
2832
+ Props:
2833
+ - `modelValue: string | null` (v-model) — Selected time (HH:MM, v-model)
2834
+ - `label?: string` — Field label
2835
+ - `placeholder?: string` — Placeholder shown when no time is selected — falls back to label, then the current locale's string
2836
+ - `disabled?: boolean` — Disables the picker
2837
+ - `error?: boolean` — Error state
2838
+ - `errorLabel?: string` — Error message shown when error is true
2839
+ - `hint?: string` — Hint text below the field
2840
+ - `minuteStep?: number = 5` — Minute increment step
2841
+ - `use24h?: boolean = true` — Use 24-hour format
2842
+ - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the border
2843
+
2844
+ Events:
2845
+ - `update:modelValue(string | null)` — Emitted with the picked time.
2846
+
2847
+ ### MTimePickerModal
2848
+
2849
+ A modal, centered time picker with a clock dial and a keyboard input mode. Supports AM/PM toggle and 24h format — the sibling of MTimePicker, a fully separate component rather than a shared internal.
2850
+
2851
+ Props:
2852
+ - `modelValue: string | null = null` (v-model) — Selected time in HH:MM format (v-model)
2853
+ - `show?: boolean = false` (v-model:show) — Controls dialog visibility (v-model:show)
2854
+ - `use24h?: boolean = false` — Use 24-hour format (shows inner ring 13-23)
2855
+ - `minuteStep?: number = 5` — Minute increment step
2856
+ - `title?: string` — Dialog title
2857
+
2858
+ Events:
2859
+ - `update:modelValue(string | null)` — Emitted when a time is confirmed — powers v-model
2860
+ - `update:show(boolean)` — Emitted when the dialog opens or closes — powers v-model:show
2861
+
2862
+ ### MTitle
2863
+
2864
+ Semantic heading component in three sizes — a thin wrapper around `MText` at medium weight.
2865
+
2866
+ Props:
2867
+ - `size?: "medium" | "small" | "large" = "large"` — Title size (maps to headline-large/medium/small)
2868
+ - `color?: "error" | "primary" | "secondary" | "tertiary" | "on-surface-variant" | "on-surface" | "inherit" = "inherit"` — Text color
2869
+ - `align?: "right" | "left" | "center"` — Text alignment
2870
+ - `truncate?: boolean` — Truncate text with ellipsis on overflow
2871
+
2872
+ Slots:
2873
+ - `#default` — The title text.
2874
+
2875
+ ### MToggleButton
2876
+
2877
+ M3 Expressive's standalone toggle button — morphs its own shape between a pill and a squared corner on check, and squishes further while pressed, all on a real spring. Distinct from MSegmentedButton/MButtonGroup, which are groups of options — this is a single button.
2878
+
2879
+ Props:
2880
+ - `checked: boolean` (v-model:checked) — Whether the toggle button is checked/selected — v-model.
2881
+ - `variant?: "elevated" | "filled" | "outlined" | "tonal" = "filled"` — Visual style, matching MButton's naming
2882
+ - `disabled?: boolean = false` — Disables interaction
2883
+ - `icon?: string` — Material Symbol icon name shown before the label
2884
+ - `size?: "xs" | "sm" | "md" | "lg" | "xl" = "sm"` — Same 5-tier expressive sizing as MButton
2885
+
2886
+ Events:
2887
+ - `update:checked(boolean)` — Emitted when clicked — powers v-model:checked
2888
+
2889
+ Slots:
2890
+ - `#default` — The button's label, after the icon.
2891
+
2892
+ ### MToolbar
2893
+
2894
+ A container for grouping icon buttons and actions — docked to an edge or floating as a rounded pill, horizontal or vertical, with an optional paired FAB.
2895
+
2896
+ Props:
2897
+ - `variant?: "docked" | "floating" = "docked"` — Docked (edge-attached, full width/height, bordered) or floating (rounded pill with shadow)
2898
+ - `orientation?: "horizontal" | "vertical" = "horizontal"` — Layout direction
2899
+ - `color?: "surface" | "primary" | "secondary" | "tertiary" = "surface"` — Background color scheme
2900
+ - `fabPosition?: "start" | "none" | "end" = "none"` — Where the #fab slot renders relative to the toolbar body
2901
+ - `align?: "center" | "start" | "end" | "between" = "center"` — Item alignment along the main axis
2902
+
2903
+ Slots:
2904
+ - `#fab` — A FAB rendered alongside the toolbar body, positioned by fabPosition
2905
+ - `#default` — Toolbar items — typically MIconButton/MButton, separated with MDivider
2906
+
2907
+ ### MTooltip
2908
+
2909
+ A hover/focus-triggered label — plain text, or a rich variant with a title, detailed content, and action buttons.
2910
+
2911
+ Props:
2912
+ - `text?: string` — Tooltip text (plain variant), or the rich variant's title line
2913
+ - `placement?: "top" | "right" | "bottom" | "left" = "top"` — Tooltip position relative to the trigger
2914
+ - `delay?: number = 600` — Show delay in ms after hover/focus
2915
+ - `rich?: boolean = false` — Rich tooltip with a #content slot and optional #actions. Stays open when hovering the tooltip itself instead of closing immediately.
2916
+
2917
+ Slots:
2918
+ - `#default` — The trigger element the tooltip is anchored to
2919
+ - `#content` — Rich-tooltip body content (only used when rich is true)
2920
+ - `#actions` — Rich-tooltip action buttons row (only used when rich is true)
2921
+
2922
+ ### MTopAppBar
2923
+
2924
+ A top app bar in four M3 layouts — center-aligned, small, medium, and large — with a leading navigation icon and trailing actions.
2925
+
2926
+ Props:
2927
+ - `title?: string` — App bar title
2928
+ - `variant?: "center" | "medium" | "small" | "large" = "small"` — 64dp small/center-aligned row, or a 112dp medium / 152dp large two-row layout with the title below
2929
+ - `navigationIcon?: string` — Leading icon (e.g. menu, arrow_back)
2930
+ - `navigationLabel?: string` — Accessible label for the navigation icon button — defaults to the locale's generic "Menu" label; override when navigationIcon is actually a back arrow rather than a drawer toggle.
2931
+ - `elevated?: boolean` — Swaps both container color (surface → surface-container) and elevation (level 0 → level 2), matching the real M3 on-scroll container tokens rather than just adding a shadow
2932
+ - `bordered?: boolean` — Add a bottom border (border-outline-variant)
2933
+
2934
+ Events:
2935
+ - `navigation()` — Emitted when the default navigation icon button is clicked (not emitted when the #navigation slot is overridden — that content is fully custom)
2936
+
2937
+ Slots:
2938
+ - `#navigation` — Custom leading area (default: an MIconButton built from the navigationIcon prop)
2939
+ - `#title` — Custom title content (default: renders the title prop)
2940
+ - `#actions` — Trailing action buttons
2941
+
2942
+ ### MTour
2943
+
2944
+ A guided, step-by-step walkthrough that highlights a page element per step with an auto-positioned tooltip and a dimming scrim.
2945
+
2946
+ Props:
2947
+ - `modelValue: boolean` (v-model) — Show/hide the tour (v-model)
2948
+ - `steps: TourStep[]` — Ordered list of steps; see `TourStep`
2949
+ - `prevLabel?: string` — Label for the Previous button (defaults to the locale string, 'Previous')
2950
+ - `nextLabel?: string` — Label for the Next button (defaults to the locale string, 'Next')
2951
+ - `finishLabel?: string` — Label for the final step's button (defaults to the locale string, 'Finish')
2952
+
2953
+ Events:
2954
+ - `update:modelValue(boolean)` — Emitted when the tour opens or closes (Escape-less — closed via the X button, clicking the scrim, or finishing) — powers v-model
2955
+ - `finish()` — Emitted when the user completes the last step (clicks the finish button)
2956
+
2957
+ ```ts
2958
+ export interface TourStep {
2959
+ target: string
2960
+ title: string
2961
+ content: string
2962
+ placement?: 'top' | 'bottom' | 'left' | 'right'
2963
+ }
2964
+ ```
2965
+
2966
+ ### MTransferList
2967
+
2968
+ Move items between two panes, with select-all, optional search and v-model on the values in the target pane. Check rows and use the arrows, or double-click a row (or press Enter on its checkbox) to send it straight across. When the component is narrow, the panes stack and the arrows point up and down.
2969
+
2970
+ Props:
2971
+ - `modelValue: Value[]` (v-model) — Values in the target (right or bottom) pane (v-model)
2972
+ - `items: T[]` — Full list of items; see `TransferItem` (or your own type extending it)
2973
+ - `sourceTitle?: string` — Source pane title (defaults to the locale string)
2974
+ - `targetTitle?: string` — Target pane title (defaults to the locale string)
2975
+ - `filterable?: boolean = false` — Show a search field in each pane. It matches the label and the description
2976
+ - `searchPlaceholder?: string` — Search field placeholder (defaults to the locale string)
2977
+ - `emptyText?: string` — Text when a pane is empty (defaults to the locale string)
2978
+ - `moveAllRightLabel?: string` — Aria label for the move-all-right button (defaults to the locale string)
2979
+ - `moveRightLabel?: string` — Aria label for the move-selected-right button (defaults to the locale string)
2980
+ - `moveLeftLabel?: string` — Aria label for the move-selected-left button (defaults to the locale string)
2981
+ - `moveAllLeftLabel?: string` — Aria label for the move-all-left button (defaults to the locale string)
2982
+ - `listHeight?: string = "280px"` — Height of each list's scroll area (any CSS length).
2983
+ - `bare?: boolean = false` — Fully custom rows: the `#item` slot draws the whole row (no checkbox, padding, min height or background). The row stays clickable, focusable (Space checks it, Enter moves it) and animated; use the slot's `checked` to style the checked state.
2984
+
2985
+ Events:
2986
+ - `update:modelValue(Value[])` — Emitted whenever items move between panes (v-model)
2987
+
2988
+ Slots:
2989
+ - `#item { item: T; checked: boolean; side: "source" | "target"; toggle: () => void; move: () => void; }` — Custom row content. Without `bare` it replaces the icon and text, keeping the checkbox, highlight and hover. Buttons, links, fields and `[data-transfer-action]` elements inside keep their own clicks instead of checking the row.
2990
+ - `#source-empty` — Custom content when the source pane is empty
2991
+ - `#target-empty` — Custom content when the target pane is empty
2992
+
2993
+ ```ts
2994
+ export interface TransferItem {
2995
+ value: string | number
2996
+ label: string
2997
+ icon?: string
2998
+ /** Optional second line under the label (an email, a role, a short description). */
2999
+ description?: string
3000
+ }
3001
+ ```
3002
+
3003
+ ```ts
3004
+ type Value = string | number
3005
+ ```
3006
+
3007
+ ### MTree
3008
+
3009
+ A hierarchical tree view with expand/collapse, single-node selection, and optional cascading checkbox selection.
3010
+
3011
+ Props:
3012
+ - `nodes: TreeNode[]` — Root nodes to render — required
3013
+ - `selected?: string | number | null = null` (v-model:selected) — Currently selected node id (single-select).
3014
+ - `checked?: (string | number)[] = []` (v-model:checked) — Checked node ids (checkable multi-select).
3015
+ - `checkable?: boolean = false` — Show checkboxes with cascade selection.
3016
+ - `defaultExpanded?: "none" | (string | number)[] | "all" = "none"` — Which nodes start expanded. 'all' | 'none' | array of ids (default: 'none').
3017
+ - `emptyText?: string` — Text shown when nodes is empty. Falls back to the app's configured locale's noItems string
3018
+
3019
+ Events:
3020
+ - `update:selected(string | number | null)` — Fires when a node is clicked, toggling selection (clicking the already-selected node clears it)
3021
+ - `update:checked((string | number)[])` — Fires when a checkbox toggles a node (checkable mode)
3022
+ - `node-click(TreeNode)` — Fires whenever a node row is clicked, alongside update:selected
3023
+
3024
+ Exposed (template ref):
3025
+ - `expandAll: () => void`
3026
+ - `collapseAll: () => void`
3027
+
3028
+ ```ts
3029
+ // ── Public types ────────────────────────────────────────────────────────────
3030
+
3031
+ export interface TreeNode {
3032
+ id: string | number
3033
+ label: string
3034
+ icon?: string
3035
+ children?: TreeNode[]
3036
+ disabled?: boolean
3037
+ [key: string]: unknown
3038
+ }
3039
+ ```
3040
+
3041
+ ### MTreeTable
3042
+
3043
+ A hierarchical table for nested data like file systems or org charts — rows can carry a `children` array, and the first column renders the indent and expand/collapse toggle automatically.
3044
+
3045
+ Props:
3046
+ - `columns: TreeTableColumn[]` — Column definitions; see `TreeTableColumn`
3047
+ - `rows: TreeTableRow[]` — Hierarchical rows with an optional children array; see `TreeTableRow`
3048
+ - `rowKey?: string = "id"` — Unique key field
3049
+ - `defaultExpanded?: boolean = false` — Expand all nodes with children by default
3050
+ - `indent?: number = 24` — Indentation per depth level, in px
3051
+ - `dense?: boolean = false` — Compact row height
3052
+ - `emptyText?: string` — Text shown when rows is empty. Falls back to the app's configured locale's noResults string
3053
+
3054
+ Events:
3055
+ - `rowClick(TreeTableRow)` — Emitted with the row when you click it.
3056
+
3057
+ Slots:
3058
+ - `#toolbar { expandAll: () => void; collapseAll: () => void; }` — Toolbar content above the table, only rendered when this slot is used — gets expandAll()/collapseAll() helpers
3059
+
3060
+ ```ts
3061
+ export interface TreeTableColumn {
3062
+ key: string
3063
+ label: string
3064
+ width?: string
3065
+ align?: 'left' | 'center' | 'right'
3066
+ }
3067
+ ```
3068
+
3069
+ ```ts
3070
+ export interface TreeTableRow {
3071
+ [key: string]: any
3072
+ children?: TreeTableRow[]
3073
+ }
3074
+ ```
3075
+
3076
+ ### MVirtualTable
3077
+
3078
+ Renders only the rows currently in (or near) the viewport, so a table with thousands of rows stays smooth — no pagination needed. Trade-off: no built-in search/filtering, sort is a client-side full-array sort.
3079
+
3080
+ Props:
3081
+ - `columns: VTableColumn[]` — Column definitions; see `VTableColumn`
3082
+ - `rows: Record<string, any>[]` — All rows — the full array is held in memory, only visible rows are rendered to the DOM
3083
+ - `rowHeight?: number = 44` — Fixed row height in px, used for the virtualization math
3084
+ - `rowKey?: string = "id"` — Unique key field
3085
+ - `overscan?: number = 5` — Extra rows rendered above/below the visible viewport, to reduce blank flashes on fast scroll
3086
+ - `maxHeight?: string = "500px"` — Scrollable container height (any valid CSS height)
3087
+
3088
+ Events:
3089
+ - `rowClick(Record<string, any>)` — Emitted with the row's data when you click a row.
3090
+
3091
+ ```ts
3092
+ export interface VTableColumn {
3093
+ key: string
3094
+ label: string
3095
+ width?: string
3096
+ align?: 'left' | 'center' | 'right'
3097
+ sortable?: boolean
3098
+ }
3099
+ ```
3100
+
3101
+ ### MWindow
3102
+
3103
+ A floating, draggable, resizable window — the building block for a desktop-style multi-window UI inside your app. Drag from the title bar, resize from any edge or corner, minimize to just the title bar, maximize (or double-click the title bar) to fill its container, and click any window to bring it to front. The window in front shows a stronger title bar and elevation, the others step back. Material 3 has no window component, so this one is built from M3 pieces: surface tones, elevation levels, 32dp icon buttons with state layers, and standard motion.
3104
+
3105
+ Props:
3106
+ - `modelValue: boolean` (v-model) — Visible state (v-model)
3107
+ - `title?: string` — Window title in the title bar
3108
+ - `icon?: string` — Material Symbol icon in the title bar
3109
+ - `width?: string = "400px"` — Initial width
3110
+ - `height?: string = "300px"` — Initial height
3111
+ - `minWidth?: number = 200` — Minimum width in px
3112
+ - `minHeight?: number = 150` — Minimum height in px
3113
+ - `maxWidth?: number` — Maximum width in px
3114
+ - `maxHeight?: number` — Maximum height in px
3115
+ - `resizable?: boolean = true` — Allow resizing from edges and corners
3116
+ - `draggable?: boolean = true` — Allow dragging from the title bar
3117
+ - `closable?: boolean = true` — Show close button
3118
+ - `minimizable?: boolean = true` — Show minimize button (collapses to title bar)
3119
+ - `maximizable?: boolean = true` — Maximize button, and double-click on the title bar, to fill the parent and back.
3120
+ - `snap?: boolean = false` — Edge snapping while dragging, like GNOME: hold the pointer at the parent's top edge to maximize, or at its left/right edge to fill that half. A preview shows where it will land.
3121
+ - `offscreen?: boolean = false` — Lets the window be dragged partly out of its container, like a desktop: up to 3/4 of its width past either side, and down until only the title bar shows; never above the top. The container should clip it (`overflow: hidden`).
3122
+ - `x?: number = 50` — Initial X position
3123
+ - `y?: number = 50` — Initial Y position
3124
+ - `resetPosition?: boolean = false` — Reset position, size, and state when the window is closed
3125
+
3126
+ Events:
3127
+ - `close()` — Emitted when the close button is clicked
3128
+ - `update:modelValue(value: boolean)` — Emitted when the window closes — powers v-model
3129
+ - `minimize()` — Emitted when the minimize button is toggled (either direction)
3130
+ - `maximize(maximized: boolean)` — Emitted when the window is maximized (true) or restored (false)
3131
+ - `focus()` — Emitted when the window comes to the front.
3132
+
3133
+ Slots:
3134
+ - `#header` — Replaces the default icon + title, keeps drag behavior
3135
+ - `#actions` — Extra buttons in the title bar, before minimize/maximize/close. MIconButton size="xs" matches the built-in ones
3136
+ - `#default` — The window's content, under the title bar. Unmounted while the window is hidden.
3137
+
3138
+ Exposed (template ref):
3139
+ - `focus: () => void` — Brings the window to the front, e.g. from a taskbar.
3140
+ - `toggleMaximize: () => void`
3141
+ - `toggleMinimize: () => void`
3142
+
3143
+ ## Composables and functions
3144
+
3145
+ ### shapeNames
3146
+
3147
+ ```ts
3148
+ shapeNames: ("Circle" | "Square" | "Slanted" | "Arch" | "Fan" | "Arrow" | "SemiCircle" | "Oval" | "Pill" | "Triangle" | "Diamond" | "ClamShell" | "Pentagon" | "Gem" | "Sunny" | "VerySunny" | "Cookie4Sided" | "Cookie6Sided" | "Cookie7Sided" | "Cookie9Sided" | "Cookie12Sided" | "Ghostish" | "Clover4Leaf" | "Clover8Leaf" | "Burst" | "SoftBurst" | "Boom" | "SoftBoom" | "Flower" | "Puffy" | "PuffyDiamond" | "PixelCircle" | "PixelTriangle" | "Bun" | "Heart")[]
3149
+ ```
3150
+
3151
+ ### createM3UI
3152
+
3153
+ ```ts
3154
+ createM3UI(options: M3UIOptions = {}): {
3155
+ install: (app: App<any>) => void
3156
+ }
3157
+ ```
3158
+
3159
+ ### useTheme
3160
+
3161
+ ```ts
3162
+ useTheme(): {
3163
+ theme: Ref<Theme>
3164
+ cycle: () => void
3165
+ }
3166
+ ```
3167
+
3168
+ ### useColorPalette
3169
+
3170
+ ```ts
3171
+ useColorPalette(): {
3172
+ palette: Ref<string>
3173
+ palettes: Palette[]
3174
+ set: (id: string) => void
3175
+ persistPalette: Ref<boolean>
3176
+ setPersistPalette: (enabled: boolean) => void
3177
+ }
3178
+ ```
3179
+
3180
+ ### palettes
3181
+
3182
+ ```ts
3183
+ palettes: Palette[]
3184
+ ```
3185
+
3186
+ ### useToast
3187
+
3188
+ ```ts
3189
+ useToast(): {
3190
+ toasts: Ref<Toast[]>
3191
+ position: Ref<ToastPosition>
3192
+ show: (message: string, variant: ToastVariant = 'info', options: number | ToastOptions = {}) => number
3193
+ success: (msg: string, opts?: ToastOptions) => number
3194
+ error: (msg: string, opts?: ToastOptions) => number
3195
+ warning: (msg: string, opts?: ToastOptions) => number
3196
+ info: (msg: string, opts?: ToastOptions) => number
3197
+ loading: (msg: string, opts?: Omit<ToastOptions, 'loading'>) => number
3198
+ update: (id: number, patch: Partial<Omit<Toast, 'id'>>) => void
3199
+ dismiss: (id: number) => void
3200
+ }
3201
+ ```
3202
+
3203
+ ### useFieldBg
3204
+
3205
+ Auto-detects the background behind `containerEl` and exposes it as `--field-bg`. Prefers a CSS variable reference (e.g. var(--color-surface-container-low)) over a raw computed color so the outlined label cutout transitions in sync with the rest of the theme switch instead of lagging behind.
3206
+
3207
+ ```ts
3208
+ useFieldBg(containerEl: Ref<HTMLElement | null>, fieldBgProp: () => string | undefined): {
3209
+ resolvedFieldBg: ComputedRef<string>
3210
+ }
3211
+ ```
3212
+
3213
+ ### useLocale
3214
+
3215
+ ```ts
3216
+ useLocale(): M3Locale
3217
+ ```
3218
+
3219
+ ### defaultLocale
3220
+
3221
+ ```ts
3222
+ defaultLocale: M3Locale
3223
+ ```
3224
+
3225
+ ### useDevice
3226
+
3227
+ ```ts
3228
+ useDevice(): {
3229
+ isMobile: Ref<boolean>
3230
+ }
3231
+ ```
3232
+
3233
+ ### useWindowSizeClass
3234
+
3235
+ The M3 width/height size classes, reactive. With no argument it tracks the browser window. Pass an element (ref or getter) to classify that element's own size instead, which is what the adaptive layout components do, so they adapt to the space they actually get (a column, a dialog, a resizable panel).
3236
+
3237
+ ```ts
3238
+ useWindowSizeClass(target?: MaybeRefOrGetter<HTMLElement | null | undefined>): WindowSizeClassInfo
3239
+ ```
3240
+
3241
+ ### widthSizeClass
3242
+
3243
+ ```ts
3244
+ widthSizeClass(width: number): WidthSizeClass
3245
+ ```
3246
+
3247
+ ### heightSizeClass
3248
+
3249
+ ```ts
3250
+ heightSizeClass(height: number): HeightSizeClass
3251
+ ```
3252
+
3253
+ ### useNotification
3254
+
3255
+ ```ts
3256
+ useNotification(): {
3257
+ notifications: Ref<Notification[]>
3258
+ position: Ref<NotificationPosition>
3259
+ show: (message: string, variant: NotificationVariant = 'info', options: NotificationOptions = {}) => number
3260
+ success: (msg: string, opts?: NotificationOptions) => number
3261
+ error: (msg: string, opts?: NotificationOptions) => number
3262
+ warning: (msg: string, opts?: NotificationOptions) => number
3263
+ info: (msg: string, opts?: NotificationOptions) => number
3264
+ loading: (msg: string, opts?: Omit<NotificationOptions, 'loading'>) => number
3265
+ update: (id: number, patch: Partial<Omit<Notification, 'id'>>) => void
3266
+ dismiss: (id: number) => void
3267
+ }
3268
+ ```
3269
+
3270
+ ### useDebounce
3271
+
3272
+ ```ts
3273
+ useDebounce(fn: (...args: any[]) => void, ms: number): {
3274
+ debounced: (...args: any[]) => void
3275
+ cancel: () => void
3276
+ }
3277
+ ```
3278
+
3279
+ ### usePageProgress
3280
+
3281
+ Shared page-loading progress state (e.g. for a top progress bar between route navigations). Module-level so any number of callers/components stay in sync — call `start()`/`done()` from a router guard, a fetch wrapper, or by hand.
3282
+
3283
+ ```ts
3284
+ usePageProgress(): {
3285
+ progress: Ref<number>
3286
+ isActive: Ref<boolean>
3287
+ start: () => void
3288
+ set: (pct: number) => void
3289
+ done: () => void
3290
+ }
3291
+ ```
3292
+
3293
+ ### emojiCategories
3294
+
3295
+ ```ts
3296
+ emojiCategories: EmojiCategory[]
3297
+ ```
3298
+
3299
+ ### allEmojis
3300
+
3301
+ ```ts
3302
+ allEmojis: string[]
3303
+ ```
3304
+
3305
+ ### randomEmoji
3306
+
3307
+ ```ts
3308
+ randomEmoji(from?: string[]): string
3309
+ ```
3310
+
3311
+ ### withSkinTone
3312
+
3313
+ `emoji` with skin tone `tone` (0 = none, 1–5 = light to dark), if it takes one.
3314
+
3315
+ ```ts
3316
+ withSkinTone(emoji: string, tone: number): string
3317
+ ```
3318
+
3319
+ ### toneableEmojis
3320
+
3321
+ Emoji that take a skin tone (all five one-tone variants exist).
3322
+
3323
+ ```ts
3324
+ toneableEmojis: Set<string>
3325
+ ```
3326
+
3327
+ ### skinTones
3328
+
3329
+ The five Fitzpatrick modifiers, light to dark.
3330
+
3331
+ ```ts
3332
+ skinTones: readonly ["🏻", "🏼", "🏽", "🏾", "🏿"]
3333
+ ```
3334
+
3335
+ ## Types
3336
+
3337
+ ```ts
3338
+ export interface M3UIOptions {
3339
+ palette?: string
3340
+ /**
3341
+ * Set to `false` to make `palette` a hard default that always wins on boot, ignoring
3342
+ * whatever is already stored in localStorage, and to stop future `useColorPalette().set()`
3343
+ * calls from persisting either. Palette switching still works live within the session
3344
+ * (`set()` still applies immediately) — only the "remember it for next time" part is disabled.
3345
+ * Defaults to `true`, matching prior behavior (`palette` only seeds the very first visit,
3346
+ * and any later choice persists and wins over it).
3347
+ */
3348
+ persistPalette?: boolean
3349
+ /**
3350
+ * Palettes of your own, added to `useColorPalette().palettes` so palette pickers built from
3351
+ * that list show them. An entry whose `id` matches a built-in palette replaces it. Each one
3352
+ * still needs its CSS: `[data-palette='<id>'] { --color-primary: ...; }` plus a
3353
+ * `[data-palette='<id>'].dark { ... }` block, overriding the same tokens as `palettes.css`.
3354
+ */
3355
+ customPalettes?: Palette[]
3356
+ locale?: MaybeRef<Partial<M3Locale>>
3357
+ }
3358
+ ```
3359
+
3360
+ ```ts
3361
+ export type Theme = 'light' | 'dark' | 'system'
3362
+ ```
3363
+
3364
+ ```ts
3365
+ export interface Palette {
3366
+ id: string
3367
+ label: string
3368
+ seed: string
3369
+ }
3370
+ ```
3371
+
3372
+ ```ts
3373
+ export interface Toast {
3374
+ id: number
3375
+ message: string
3376
+ variant: ToastVariant
3377
+ duration: number
3378
+ loading?: boolean
3379
+ action?: ToastAction
3380
+ icon?: string | null // null = suppress icon entirely
3381
+ color?: string
3382
+ count: number // ≥ 2 → show badge
3383
+ }
3384
+ ```
3385
+
3386
+ ```ts
3387
+ export type ToastVariant = 'info' | 'success' | 'warning' | 'error'
3388
+ ```
3389
+
3390
+ ```ts
3391
+ export type ToastPosition =
3392
+ | 'top-left' | 'top-center' | 'top-right'
3393
+ | 'bottom-left' | 'bottom-center' | 'bottom-right'
3394
+ ```
3395
+
3396
+ ```ts
3397
+ export interface ToastAction { label: string; onClick: () => void }
3398
+ ```
3399
+
3400
+ ```ts
3401
+ export interface ToastOptions {
3402
+ duration?: number
3403
+ loading?: boolean
3404
+ action?: ToastAction
3405
+ icon?: string | null
3406
+ color?: string
3407
+ }
3408
+ ```
3409
+
3410
+ ```ts
3411
+ export interface M3Locale {
3412
+ /** BCP-47 language tag (e.g. 'en', 'es', 'pt') — read by locale-aware components (MRelativeTime) that use Intl formatting. */
3413
+ lang: string
3414
+
3415
+ // Common
3416
+ search: string
3417
+ noResults: string
3418
+ close: string
3419
+ cancel: string
3420
+ confirm: string
3421
+ loading: string
3422
+ menu: string
3423
+
3424
+ // Navigation
3425
+ previous: string
3426
+ next: string
3427
+ today: string
3428
+ more: string
3429
+
3430
+ // Tables
3431
+ selectedCount: string
3432
+ recordCount: string
3433
+ expand: string
3434
+ columns: string
3435
+ exportCsv: string
3436
+ noGroup: string
3437
+
3438
+ // Tour
3439
+ finish: string
3440
+
3441
+ // File upload
3442
+ dropText: string
3443
+ selectText: string
3444
+ maxSizePrefix: string
3445
+ remove: string
3446
+
3447
+ // Pickers
3448
+ selectDate: string
3449
+ selectTime: string
3450
+ selectRange: string
3451
+ pickStart: string
3452
+ pickEnd: string
3453
+ previousMonth: string
3454
+ nextMonth: string
3455
+
3456
+ // Scheduler
3457
+ dayView: string
3458
+ weekView: string
3459
+ allDay: string
3460
+ emojiSearch: string
3461
+ emojiNoResults: string
3462
+ emojiRecent: string
3463
+ emojiSkinTone: string
3464
+ emojiSkinTones: string
3465
+ emojiCategorySmileys: string
3466
+ emojiCategoryGestures: string
3467
+ emojiCategoryPeople: string
3468
+ emojiCategoryAnimals: string
3469
+ emojiCategoryNature: string
3470
+ emojiCategoryFood: string
3471
+ emojiCategoryActivities: string
3472
+ emojiCategoryTravel: string
3473
+ emojiCategoryObjects: string
3474
+ emojiCategorySymbols: string
3475
+ emojiCategoryFlags: string
3476
+
3477
+ // Transfer list
3478
+ available: string
3479
+ selected: string
3480
+ noItems: string
3481
+ moveAllRight: string
3482
+ moveRight: string
3483
+ moveLeft: string
3484
+ moveAllLeft: string
3485
+
3486
+ // Command palette / Spotlight
3487
+ searchCommand: string
3488
+ navigateHint: string
3489
+ selectHint: string
3490
+ openHint: string
3491
+ closeHint: string
3492
+
3493
+ // Infinite scroll
3494
+ loadingMore: string
3495
+ noMoreItems: string
3496
+
3497
+ // Rich text editor
3498
+ bold: string
3499
+ italic: string
3500
+ underline: string
3501
+ strikethrough: string
3502
+ highlight: string
3503
+ bulletList: string
3504
+ orderedList: string
3505
+ blockquote: string
3506
+ code: string
3507
+ alignLeft: string
3508
+ alignCenter: string
3509
+ alignRight: string
3510
+ undo: string
3511
+ redo: string
3512
+ link: string
3513
+ image: string
3514
+ paragraph: string
3515
+ heading1: string
3516
+ heading2: string
3517
+ heading3: string
3518
+ insertLink: string
3519
+ insertImage: string
3520
+ imageUrlLabel: string
3521
+ insert: string
3522
+
3523
+ // JSON editor
3524
+ jsonValid: string
3525
+ jsonInvalid: string
3526
+ jsonFormat: string
3527
+ jsonMinify: string
3528
+
3529
+ // JSON viewer
3530
+ jsonElements: string
3531
+ jsonFields: string
3532
+
3533
+ // Result
3534
+ resultSuccessTitle: string
3535
+ resultSuccessDesc: string
3536
+ resultErrorTitle: string
3537
+ resultErrorDesc: string
3538
+ resultWarningTitle: string
3539
+ resultWarningDesc: string
3540
+ resultInfoTitle: string
3541
+ resultInfoDesc: string
3542
+ result404Title: string
3543
+ result404Desc: string
3544
+ result403Title: string
3545
+ result403Desc: string
3546
+ result500Title: string
3547
+ result500Desc: string
3548
+
3549
+ // Chat bubble
3550
+ chatTyping: string
3551
+ chatRecordingAudio: string
3552
+
3553
+ // Drag & drop list ({pos}/{total} are replaced at runtime)
3554
+ reorderHandle: string
3555
+ reorderGrabbed: string
3556
+ reorderMoved: string
3557
+ reorderDropped: string
3558
+ reorderCancelled: string
3559
+
3560
+ // Transfer list (panes)
3561
+ selectAll: string
3562
+ clearSearch: string
3563
+
3564
+ // Kanban ({column}/{pos}/{total} are replaced at runtime)
3565
+ kanbanMoved: string
3566
+ // MWindow title bar buttons
3567
+ windowMinimize: string
3568
+ windowMaximize: string
3569
+ windowRestore: string
3570
+ // MPagination ({from}/{to}/{total} and {page}/{pages} are replaced at runtime)
3571
+ paginationRange: string
3572
+ paginationPage: string
3573
+ previousPage: string
3574
+ nextPage: string
3575
+ carousel: string
3576
+ carouselItem: string
3577
+ }
3578
+ ```
3579
+
3580
+ ```ts
3581
+ /*
3582
+ * M3 window size classes, with the breakpoints from androidx `WindowSizeClass`
3583
+ * (window-core: WIDTH_DP_MEDIUM_LOWER_BOUND 600, EXPANDED 840, LARGE 1200, EXTRA_LARGE 1600;
3584
+ * HEIGHT_DP_MEDIUM_LOWER_BOUND 480, EXPANDED 900). CSS px stand in for dp.
3585
+ */
3586
+ export type WidthSizeClass = 'compact' | 'medium' | 'expanded' | 'large' | 'extra-large'
3587
+ ```
3588
+
3589
+ ```ts
3590
+ export type HeightSizeClass = 'compact' | 'medium' | 'expanded'
3591
+ ```
3592
+
3593
+ ```ts
3594
+ export interface WindowSizeClassInfo {
3595
+ width: Ref<number>
3596
+ height: Ref<number>
3597
+ widthClass: Ref<WidthSizeClass>
3598
+ heightClass: Ref<HeightSizeClass>
3599
+ }
3600
+ ```
3601
+
3602
+ ```ts
3603
+ export interface Notification {
3604
+ id: number
3605
+ message: string
3606
+ variant: NotificationVariant
3607
+ duration: number
3608
+ loading?: boolean
3609
+ icon?: string | null // null = suppress icon entirely
3610
+ closable?: boolean
3611
+ action?: NotificationAction
3612
+ count: number // ≥ 2 → show badge
3613
+ }
3614
+ ```
3615
+
3616
+ ```ts
3617
+ export type NotificationVariant = 'info' | 'success' | 'warning' | 'error'
3618
+ ```
3619
+
3620
+ ```ts
3621
+ export type NotificationPosition =
3622
+ | 'top-left' | 'top-center' | 'top-right'
3623
+ | 'bottom-left' | 'bottom-center' | 'bottom-right'
3624
+ ```
3625
+
3626
+ ```ts
3627
+ export interface NotificationOptions {
3628
+ duration?: number
3629
+ loading?: boolean
3630
+ icon?: string | null
3631
+ closable?: boolean
3632
+ action?: NotificationAction
3633
+ }
3634
+ ```
3635
+
3636
+ ```ts
3637
+ // Generated by scripts/generate-emoji-data.mjs from Unicode emoji-test.txt (Emoji 15). Don't edit by hand.
3638
+
3639
+ export interface EmojiCategory {
3640
+ id: string
3641
+ /** English name; MEmojiSelector shows the locale's (emojiCategory* keys). */
3642
+ label: string
3643
+ icon: string
3644
+ emojis: string[]
3645
+ }
3646
+ ```
3647
+
3648
+ ## Locale
3649
+
3650
+ `M3Locale` keys (pass a partial object to `createM3UI({ locale })`; presets from `@m3ui-vue/m3ui-vue/locales`:
3651
+ `esLocale`, `frLocale`, `ptLocale`, `deLocale`, `jaLocale`, `zhLocale`, `koLocale`):
3652
+
3653
+ lang, search, noResults, close, cancel, confirm, loading, menu, previous, next, today, more, selectedCount, recordCount, expand, columns, exportCsv, noGroup, finish, dropText, selectText, maxSizePrefix, remove, selectDate, selectTime, selectRange, pickStart, pickEnd, previousMonth, nextMonth, dayView, weekView, allDay, emojiSearch, emojiNoResults, emojiRecent, emojiSkinTone, emojiSkinTones, emojiCategorySmileys, emojiCategoryGestures, emojiCategoryPeople, emojiCategoryAnimals, emojiCategoryNature, emojiCategoryFood, emojiCategoryActivities, emojiCategoryTravel, emojiCategoryObjects, emojiCategorySymbols, emojiCategoryFlags, available, selected, noItems, moveAllRight, moveRight, moveLeft, moveAllLeft, searchCommand, navigateHint, selectHint, openHint, closeHint, loadingMore, noMoreItems, bold, italic, underline, strikethrough, highlight, bulletList, orderedList, blockquote, code, alignLeft, alignCenter, alignRight, undo, redo, link, image, paragraph, heading1, heading2, heading3, insertLink, insertImage, imageUrlLabel, insert, jsonValid, jsonInvalid, jsonFormat, jsonMinify, jsonElements, jsonFields, resultSuccessTitle, resultSuccessDesc, resultErrorTitle, resultErrorDesc, resultWarningTitle, resultWarningDesc, resultInfoTitle, resultInfoDesc, result404Title, result404Desc, result403Title, result403Desc, result500Title, result500Desc, chatTyping, chatRecordingAudio, reorderHandle, reorderGrabbed, reorderMoved, reorderDropped, reorderCancelled, selectAll, clearSearch, kanbanMoved, windowMinimize, windowMaximize, windowRestore, paginationRange, paginationPage, previousPage, nextPage, carousel, carouselItem
3654
+
3655
+ ## Theme tokens
3656
+
3657
+ - Colors (`bg-*`, `text-*`, `border-*`…): primary, on-primary, primary-container, on-primary-container, secondary, on-secondary, secondary-container, on-secondary-container, tertiary, on-tertiary, tertiary-container, on-tertiary-container, error, on-error, error-container, on-error-container, success, on-success, success-container, on-success-container, background, on-background, surface, on-surface, surface-variant, on-surface-variant, surface-dim, surface-bright, surface-container-lowest, surface-container-low, surface-container, surface-container-high, surface-container-highest, outline, outline-variant, shadow, scrim, inverse-surface, inverse-on-surface, inverse-primary
3658
+ - Type scale (`text-*`): display-large, display-medium, display-small, headline-large, headline-medium, headline-small, title-large, title-medium, title-small, body-large, body-medium, body-small, label-large, label-medium, label-small
3659
+ - Radius (`rounded-*`): xs, sm, md, lg, xl
3660
+ - Shadows (`shadow-*`): elevation-1, elevation-2, elevation-3, elevation-4
3661
+ - Palettes (`useColorPalette().set(id)` / `createM3UI({ palette })`): purple, indigo, navy, blue, cyan, teal, green, lime, olive, amber, sand, orange, deep-orange, brown, red, coral, crimson, pink, violet, slate, graphite, charcoal, steel, ash, iron, fog, pewter, smoke, stone, zinc, monochrome, rust, gold, emerald, turquoise, cobalt, sapphire, amethyst, magenta, mauve