@m3ui-vue/m3ui-vue 0.9.0 → 0.9.2

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