@francofantomius/material-components 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +41 -9
  3. package/custom-elements.json +19060 -9017
  4. package/dist/chunks/account-menu-Dau0UHTl.js +1290 -0
  5. package/dist/chunks/account-menu-Dau0UHTl.js.map +1 -0
  6. package/dist/chunks/app-drawer-Du1ePzxZ.js +903 -0
  7. package/dist/chunks/app-drawer-Du1ePzxZ.js.map +1 -0
  8. package/dist/chunks/bottom-sheet-q79BBYAj.js +402 -0
  9. package/dist/chunks/bottom-sheet-q79BBYAj.js.map +1 -0
  10. package/dist/chunks/{button-B4TSZ7Sl.js → button-D2vn7kJ8.js} +9 -8
  11. package/dist/chunks/button-D2vn7kJ8.js.map +1 -0
  12. package/dist/chunks/button-group-CNqvJx1n.js +143 -0
  13. package/dist/chunks/button-group-CNqvJx1n.js.map +1 -0
  14. package/dist/chunks/carousel-item-BG6kjjjk.js +371 -0
  15. package/dist/chunks/carousel-item-BG6kjjjk.js.map +1 -0
  16. package/dist/chunks/date-picker-DJeHi4w-.js +777 -0
  17. package/dist/chunks/date-picker-DJeHi4w-.js.map +1 -0
  18. package/dist/chunks/fab-menu.css-3pu930sZ.js +320 -0
  19. package/dist/chunks/fab-menu.css-3pu930sZ.js.map +1 -0
  20. package/dist/chunks/{icon-button-BdSc7eot.js → icon-button-BQz73GLa.js} +2 -2
  21. package/dist/chunks/icon-button-BQz73GLa.js.map +1 -0
  22. package/dist/chunks/loading-indicator-CvWnZr9o.js +193 -0
  23. package/dist/chunks/loading-indicator-CvWnZr9o.js.map +1 -0
  24. package/dist/chunks/menu-item-BBSp5Cqc.js +390 -0
  25. package/dist/chunks/menu-item-BBSp5Cqc.js.map +1 -0
  26. package/dist/chunks/navigation-bar-item-C9DfOEzg.js +397 -0
  27. package/dist/chunks/navigation-bar-item-C9DfOEzg.js.map +1 -0
  28. package/dist/chunks/navigation-rail-item-6pdhNHJK.js +357 -0
  29. package/dist/chunks/navigation-rail-item-6pdhNHJK.js.map +1 -0
  30. package/dist/chunks/segmented-button-B0BvGSQ7.js +265 -0
  31. package/dist/chunks/segmented-button-B0BvGSQ7.js.map +1 -0
  32. package/dist/chunks/side-sheet-S2w081AK.js +360 -0
  33. package/dist/chunks/side-sheet-S2w081AK.js.map +1 -0
  34. package/dist/chunks/slider-D-mnO8yQ.js +450 -0
  35. package/dist/chunks/slider-D-mnO8yQ.js.map +1 -0
  36. package/dist/chunks/split-button-DUfjukQY.js +450 -0
  37. package/dist/chunks/split-button-DUfjukQY.js.map +1 -0
  38. package/dist/chunks/{table-aRTYzDyE.js → table-CqHnneAj.js} +2 -2
  39. package/dist/chunks/{table-aRTYzDyE.js.map → table-CqHnneAj.js.map} +1 -1
  40. package/dist/chunks/time-picker-CZnb2sWz.js +785 -0
  41. package/dist/chunks/time-picker-CZnb2sWz.js.map +1 -0
  42. package/dist/chunks/toolbar-DXVQbQKJ.js +271 -0
  43. package/dist/chunks/toolbar-DXVQbQKJ.js.map +1 -0
  44. package/dist/chunks/tooltip-CE7JMHMu.js +398 -0
  45. package/dist/chunks/tooltip-CE7JMHMu.js.map +1 -0
  46. package/dist/components/account-menu/account-menu.js +8 -0
  47. package/dist/components/app-drawer/app-drawer.js +9 -0
  48. package/dist/components/bottom-sheet/bottom-sheet.css.d.ts +2 -0
  49. package/dist/components/bottom-sheet/bottom-sheet.css.d.ts.map +1 -0
  50. package/dist/components/bottom-sheet/bottom-sheet.d.ts +69 -0
  51. package/dist/components/bottom-sheet/bottom-sheet.d.ts.map +1 -0
  52. package/dist/components/bottom-sheet/bottom-sheet.js +4 -0
  53. package/dist/components/button/button.css.d.ts.map +1 -1
  54. package/dist/components/button/button.js +1 -1
  55. package/dist/components/button-group/button-group.css.d.ts +2 -0
  56. package/dist/components/button-group/button-group.css.d.ts.map +1 -0
  57. package/dist/components/button-group/button-group.d.ts +28 -0
  58. package/dist/components/button-group/button-group.d.ts.map +1 -0
  59. package/dist/components/button-group/button-group.js +4 -0
  60. package/dist/components/carousel/carousel-item.d.ts +33 -0
  61. package/dist/components/carousel/carousel-item.d.ts.map +1 -0
  62. package/dist/components/carousel/carousel-item.js +4 -0
  63. package/dist/components/carousel/carousel.css.d.ts +3 -0
  64. package/dist/components/carousel/carousel.css.d.ts.map +1 -0
  65. package/dist/components/carousel/carousel.d.ts +81 -0
  66. package/dist/components/carousel/carousel.d.ts.map +1 -0
  67. package/dist/components/carousel/carousel.js +284 -0
  68. package/dist/components/carousel/carousel.js.map +1 -0
  69. package/dist/components/date-picker/date-picker.css.d.ts +2 -0
  70. package/dist/components/date-picker/date-picker.css.d.ts.map +1 -0
  71. package/dist/components/date-picker/date-picker.d.ts +59 -0
  72. package/dist/components/date-picker/date-picker.d.ts.map +1 -0
  73. package/dist/components/date-picker/date-picker.js +4 -0
  74. package/dist/components/fab-menu/fab-menu-item.d.ts +35 -0
  75. package/dist/components/fab-menu/fab-menu-item.d.ts.map +1 -0
  76. package/dist/components/fab-menu/fab-menu-item.js +93 -0
  77. package/dist/components/fab-menu/fab-menu-item.js.map +1 -0
  78. package/dist/components/fab-menu/fab-menu.css.d.ts +3 -0
  79. package/dist/components/fab-menu/fab-menu.css.d.ts.map +1 -0
  80. package/dist/components/fab-menu/fab-menu.d.ts +72 -0
  81. package/dist/components/fab-menu/fab-menu.d.ts.map +1 -0
  82. package/dist/components/fab-menu/fab-menu.js +148 -0
  83. package/dist/components/fab-menu/fab-menu.js.map +1 -0
  84. package/dist/components/icon-button/icon-button.js +1 -1
  85. package/dist/components/loading-indicator/loading-indicator.css.d.ts +2 -0
  86. package/dist/components/loading-indicator/loading-indicator.css.d.ts.map +1 -0
  87. package/dist/components/loading-indicator/loading-indicator.d.ts +48 -0
  88. package/dist/components/loading-indicator/loading-indicator.d.ts.map +1 -0
  89. package/dist/components/loading-indicator/loading-indicator.js +4 -0
  90. package/dist/components/menu/menu-item.d.ts +41 -0
  91. package/dist/components/menu/menu-item.d.ts.map +1 -0
  92. package/dist/components/menu/menu-item.js +4 -0
  93. package/dist/components/menu/menu.css.d.ts +3 -0
  94. package/dist/components/menu/menu.css.d.ts.map +1 -0
  95. package/dist/components/menu/menu.d.ts +91 -0
  96. package/dist/components/menu/menu.d.ts.map +1 -0
  97. package/dist/components/menu/menu.js +205 -0
  98. package/dist/components/menu/menu.js.map +1 -0
  99. package/dist/components/navigation-bar/navigation-bar-item.d.ts +49 -0
  100. package/dist/components/navigation-bar/navigation-bar-item.d.ts.map +1 -0
  101. package/dist/components/navigation-bar/navigation-bar-item.js +5 -0
  102. package/dist/components/navigation-bar/navigation-bar.css.d.ts +3 -0
  103. package/dist/components/navigation-bar/navigation-bar.css.d.ts.map +1 -0
  104. package/dist/components/navigation-bar/navigation-bar.d.ts +50 -0
  105. package/dist/components/navigation-bar/navigation-bar.d.ts.map +1 -0
  106. package/dist/components/navigation-bar/navigation-bar.js +150 -0
  107. package/dist/components/navigation-bar/navigation-bar.js.map +1 -0
  108. package/dist/components/navigation-rail/navigation-rail-item.d.ts +36 -0
  109. package/dist/components/navigation-rail/navigation-rail-item.d.ts.map +1 -0
  110. package/dist/components/navigation-rail/navigation-rail-item.js +5 -0
  111. package/dist/components/navigation-rail/navigation-rail.css.d.ts +3 -0
  112. package/dist/components/navigation-rail/navigation-rail.css.d.ts.map +1 -0
  113. package/dist/components/navigation-rail/navigation-rail.d.ts +43 -0
  114. package/dist/components/navigation-rail/navigation-rail.d.ts.map +1 -0
  115. package/dist/components/navigation-rail/navigation-rail.js +121 -0
  116. package/dist/components/navigation-rail/navigation-rail.js.map +1 -0
  117. package/dist/components/segmented-button/segmented-button.css.d.ts +3 -0
  118. package/dist/components/segmented-button/segmented-button.css.d.ts.map +1 -0
  119. package/dist/components/segmented-button/segmented-button.d.ts +40 -0
  120. package/dist/components/segmented-button/segmented-button.d.ts.map +1 -0
  121. package/dist/components/segmented-button/segmented-button.js +5 -0
  122. package/dist/components/side-sheet/side-sheet.css.d.ts +2 -0
  123. package/dist/components/side-sheet/side-sheet.css.d.ts.map +1 -0
  124. package/dist/components/side-sheet/side-sheet.d.ts +57 -0
  125. package/dist/components/side-sheet/side-sheet.d.ts.map +1 -0
  126. package/dist/components/side-sheet/side-sheet.js +4 -0
  127. package/dist/components/slider/slider.css.d.ts +2 -0
  128. package/dist/components/slider/slider.css.d.ts.map +1 -0
  129. package/dist/components/slider/slider.d.ts +51 -0
  130. package/dist/components/slider/slider.d.ts.map +1 -0
  131. package/dist/components/slider/slider.js +4 -0
  132. package/dist/components/split-button/split-button.css.d.ts +2 -0
  133. package/dist/components/split-button/split-button.css.d.ts.map +1 -0
  134. package/dist/components/split-button/split-button.d.ts +89 -0
  135. package/dist/components/split-button/split-button.d.ts.map +1 -0
  136. package/dist/components/split-button/split-button.js +4 -0
  137. package/dist/components/table/table.js +1 -1
  138. package/dist/components/time-picker/time-picker.css.d.ts +2 -0
  139. package/dist/components/time-picker/time-picker.css.d.ts.map +1 -0
  140. package/dist/components/time-picker/time-picker.d.ts +87 -0
  141. package/dist/components/time-picker/time-picker.d.ts.map +1 -0
  142. package/dist/components/time-picker/time-picker.js +4 -0
  143. package/dist/components/toolbar/toolbar.css.d.ts +2 -0
  144. package/dist/components/toolbar/toolbar.css.d.ts.map +1 -0
  145. package/dist/components/toolbar/toolbar.d.ts +53 -0
  146. package/dist/components/toolbar/toolbar.d.ts.map +1 -0
  147. package/dist/components/toolbar/toolbar.js +4 -0
  148. package/dist/components/tooltip/tooltip.css.d.ts +2 -0
  149. package/dist/components/tooltip/tooltip.css.d.ts.map +1 -0
  150. package/dist/components/tooltip/tooltip.d.ts +89 -0
  151. package/dist/components/tooltip/tooltip.d.ts.map +1 -0
  152. package/dist/components/tooltip/tooltip.js +4 -0
  153. package/dist/index.d.ts +21 -0
  154. package/dist/index.d.ts.map +1 -1
  155. package/dist/index.js +148 -2263
  156. package/dist/tokens/index.js +4 -2
  157. package/dist/tokens/index.js.map +1 -1
  158. package/dist/tokens/theme.css.d.ts.map +1 -1
  159. package/llms.txt +2326 -0
  160. package/package.json +99 -2
  161. package/dist/chunks/button-B4TSZ7Sl.js.map +0 -1
  162. package/dist/chunks/icon-button-BdSc7eot.js.map +0 -1
  163. package/dist/index.js.map +0 -1
package/llms.txt ADDED
@@ -0,0 +1,2326 @@
1
+ # @francofantomius/material-components
2
+
3
+ > Reusable, accessible, and lightweight Material Design 3 Web Components built with Lit.
4
+
5
+ `@francofantomius/material-components` is a comprehensive suite of modern, accessible, and lightweight **Material Design 3 (M3)** Web Components built with [Lit](https://lit.dev/). They run natively in all modern browsers and integrate seamlessly with React (18/19), Vue 3, Angular, Svelte, Solid, or vanilla HTML and JavaScript.
6
+
7
+ ## Table of Contents
8
+
9
+ - [Overview & Core Features](#overview--core-features)
10
+ - [Installation & Setup](#installation--setup)
11
+ - [Typography & Icons Setup](#typography--icons-setup)
12
+ - [Import Strategies](#import-strategies)
13
+ - [Theming & Color Palettes](#theming--color-palettes)
14
+ - [Form Integration (FACE)](#form-integration-face)
15
+ - [Framework Integration Guidelines](#framework-integration-guidelines)
16
+ - [React (18 / 19)](#react-18--19)
17
+ - [Vue 3](#vue-3)
18
+ - [Angular & Svelte](#angular--svelte)
19
+ - [Component Index](#component-index)
20
+ - [Component Reference](#component-reference)
21
+ - [Actions](#actions)
22
+ - [Button (`md-button`)](#button-md-button)
23
+ - [Button Group (`md-button-group`)](#button-group-md-button-group)
24
+ - [Segmented Button (`md-segmented-button`, `md-segmented-button-set`)](#segmented-button-md-segmented-button-md-segmented-button-set)
25
+ - [Split Button (`md-split-button`)](#split-button-md-split-button)
26
+ - [Icon Button (`md-icon-button`)](#icon-button-md-icon-button)
27
+ - [Floating Action Button (`md-fab`)](#floating-action-button-md-fab)
28
+ - [FAB Menu (`md-fab-menu`, `md-fab-menu-item`)](#fab-menu-md-fab-menu-md-fab-menu-item)
29
+ - [Toolbar (`md-toolbar`)](#toolbar-md-toolbar)
30
+ - [Inputs & Controls](#inputs--controls)
31
+ - [Text Field (`md-text-field`)](#text-field-md-text-field)
32
+ - [Checkbox (`md-checkbox`)](#checkbox-md-checkbox)
33
+ - [Radio & Radio Group (`md-radio`, `md-radio-group`)](#radio--radio-group-md-radio-md-radio-group)
34
+ - [Switch (`md-switch`)](#switch-md-switch)
35
+ - [Slider (`md-slider`)](#slider-md-slider)
36
+ - [Time Picker (`md-time-picker`)](#time-picker-md-time-picker)
37
+ - [Date Picker (`md-date-picker`)](#date-picker-md-date-picker)
38
+ - [Chip & Chip Set (`md-chip`, `md-chip-set`)](#chip--chip-set-md-chip-md-chip-set)
39
+ - [Search Bar (`md-search-bar`)](#search-bar-md-search-bar)
40
+ - [Surfaces & Containment](#surfaces--containment)
41
+ - [Card (`md-card`)](#card-md-card)
42
+ - [Dialog (`md-dialog`)](#dialog-md-dialog)
43
+ - [Divider (`md-divider`)](#divider-md-divider)
44
+ - [Menu (`md-menu`, `md-menu-item`)](#menu-md-menu-md-menu-item)
45
+ - [List & List Item (`md-list`, `md-list-item`)](#list--list-item-md-list-md-list-item)
46
+ - [Table & Data Table (`md-table`)](#table--data-table-md-table)
47
+ - [Side Sheet (`md-side-sheet`)](#side-sheet-md-side-sheet)
48
+ - [Bottom Sheet (`md-bottom-sheet`)](#bottom-sheet-md-bottom-sheet)
49
+ - [Carousel (`md-carousel`, `md-carousel-item`)](#carousel-md-carousel-md-carousel-item)
50
+ - [Communication & Feedback](#communication--feedback)
51
+ - [Badge (`md-badge`)](#badge-md-badge)
52
+ - [Progress Indicators (`md-progress`)](#progress-indicators-md-progress)
53
+ - [Loading Indicator (`md-loading-indicator`)](#loading-indicator-md-loading-indicator)
54
+ - [Snackbar (`md-snackbar`)](#snackbar-md-snackbar)
55
+ - [Tooltip (`md-tooltip`)](#tooltip-md-tooltip)
56
+ - [Navigation](#navigation)
57
+ - [Navigation Bar (`md-navigation-bar`, `md-navigation-bar-item`)](#navigation-bar-md-navigation-bar-md-navigation-bar-item)
58
+ - [Navigation Drawer (`md-navigation-drawer`, `md-navigation-drawer-item`)](#navigation-drawer-md-navigation-drawer-md-navigation-drawer-item)
59
+ - [Navigation Rail (`md-navigation-rail`, `md-navigation-rail-item`)](#navigation-rail-md-navigation-rail-md-navigation-rail-item)
60
+ - [Top App Bar (`md-top-app-bar`)](#top-app-bar-md-top-app-bar)
61
+ - [Tabs (`md-tabs`, `md-tab`)](#tabs-md-tabs-md-tab)
62
+ - [App Drawer (`md-app-drawer`, `md-app-drawer-item`)](#app-drawer-md-app-drawer-md-app-drawer-item)
63
+ - [Account Menu (`md-account-menu`, `md-account-item`)](#account-menu-md-account-menu-md-account-item)
64
+ - [Media & Playback](#media--playback)
65
+ - [Player (`md-player`)](#player-md-player)
66
+ - [Utilities & Data](#utilities--data)
67
+ - [Icon (`md-icon`)](#icon-md-icon)
68
+ - [Code Block & Highlighter (`md-code`)](#code-block--highlighter-md-code)
69
+
70
+ ---
71
+
72
+ ## Overview & Core Features
73
+
74
+ - **Material Design 3 Specifications**: Adheres to official M3 guidelines for tokenized color systems, dynamic elevation, state layers, rounded shapes, and typography.
75
+ - **Form-Associated Custom Elements (FACE)**: Text fields, checkboxes, switches, and radios utilize browser-native `ElementInternals` to participate in standard `<form>` submission, `FormData`, and native constraint validation (`required`, `checkValidity()`, `reportValidity()`).
76
+ - **Tree-Shakeable Subpaths**: Import only the elements you need (e.g., `@francofantomius/material-components/button`) to keep bundle sizes minimal.
77
+ - **Accessibility (a11y)**: Built-in WCAG 2.1 AA focus rings, full keyboard interactions, high-contrast support, and ARIA attributes.
78
+ - **TypeScript Support**: Full `.d.ts` type declarations and `custom-elements.json` (Custom Elements Manifest) for IDE autocomplete and linting.
79
+ - **Framework Agnostic**: Native Custom Elements work across React, Vue, Angular, Svelte, Solid, and vanilla HTML.
80
+
81
+ ---
82
+
83
+ ## Installation & Setup
84
+
85
+ Install the library and its peer dependency `lit`:
86
+
87
+ ```bash
88
+ npm install @francofantomius/material-components lit
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Typography & Icons Setup
94
+
95
+ Material 3 relies on **Roboto** for typography and **Material Symbols Outlined** for scalable vector icons. Include the Google Fonts stylesheets in your HTML `<head>`:
96
+
97
+ ```html
98
+ <!-- Google Material Symbols Outlined font -->
99
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
100
+
101
+ <!-- Google Roboto font -->
102
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" />
103
+ ```
104
+
105
+ ---
106
+
107
+ ## Import Strategies
108
+
109
+ ### 1. Subpath Imports (Recommended for Production)
110
+
111
+ Import individual component modules to optimize tree-shaking:
112
+
113
+ ```javascript
114
+ import '@francofantomius/material-components/button';
115
+ import '@francofantomius/material-components/text-field';
116
+ import '@francofantomius/material-components/card';
117
+ ```
118
+
119
+ ### 2. Full Component Bundle
120
+
121
+ For quick prototyping or full component registration:
122
+
123
+ ```javascript
124
+ import '@francofantomius/material-components';
125
+ ```
126
+
127
+ ---
128
+
129
+ ## Theming & Color Palettes
130
+
131
+ ### Material Design 3 CSS Custom Properties
132
+
133
+ Configure tokens globally on `:root` or scope them to a container. Dark mode can be toggled using the `[data-theme='dark']` attribute:
134
+
135
+ ```css
136
+ :root {
137
+ --md-sys-color-primary: #6750A4;
138
+ --md-sys-color-on-primary: #FFFFFF;
139
+ --md-sys-color-primary-container: #EADDFF;
140
+ --md-sys-color-on-primary-container: #21005D;
141
+ --md-sys-color-secondary: #625B71;
142
+ --md-sys-color-on-secondary: #FFFFFF;
143
+ --md-sys-color-surface: #FEF7FF;
144
+ --md-sys-color-on-surface: #1D1B20;
145
+ --md-sys-color-outline: #79747E;
146
+ --md-sys-color-error: #B3261E;
147
+ }
148
+
149
+ [data-theme='dark'] {
150
+ --md-sys-color-primary: #D0BCFF;
151
+ --md-sys-color-on-primary: #381E72;
152
+ --md-sys-color-primary-container: #4F378B;
153
+ --md-sys-color-on-primary-container: #EADDFF;
154
+ --md-sys-color-secondary: #CCC2DC;
155
+ --md-sys-color-on-secondary: #332D41;
156
+ --md-sys-color-surface: #141218;
157
+ --md-sys-color-on-surface: #E6E0E9;
158
+ --md-sys-color-outline: #938F99;
159
+ --md-sys-color-error: #F2B8B5;
160
+ }
161
+ ```
162
+
163
+ ### TypeScript Theme Helper API
164
+
165
+ The `@francofantomius/material-components/theme` module provides utilities for dynamic runtime palette assignment:
166
+
167
+ ```typescript
168
+ import { applyTheme, darkColorScheme, lightColorScheme } from '@francofantomius/material-components/theme';
169
+
170
+ // Switch to Dark Color Scheme
171
+ applyTheme(darkColorScheme);
172
+
173
+ // Switch back to Light Color Scheme
174
+ applyTheme(lightColorScheme);
175
+
176
+ // Apply Custom Brand Colors
177
+ applyTheme({
178
+ primary: '#006A60',
179
+ onPrimary: '#FFFFFF',
180
+ primaryContainer: '#74F8E5',
181
+ onPrimaryContainer: '#00201C',
182
+ });
183
+ ```
184
+
185
+ ---
186
+
187
+ ## Form Integration (FACE)
188
+
189
+ Form controls (`<md-text-field>`, `<md-checkbox>`, `<md-switch>`, `<md-radio>`) are Form-Associated Custom Elements. They automatically participate in standard HTML forms and `FormData`.
190
+
191
+ ### HTML Form Example
192
+
193
+ ```html
194
+ <form id="signup-form">
195
+ <md-text-field
196
+ name="fullname"
197
+ label="Full Name"
198
+ required
199
+ supporting-text="Enter your first and last name"
200
+ ></md-text-field>
201
+
202
+ <md-text-field
203
+ name="email"
204
+ label="Email Address"
205
+ type="email"
206
+ required
207
+ ></md-text-field>
208
+
209
+ <md-checkbox name="newsletter" checked>
210
+ Receive monthly newsletter
211
+ </md-checkbox>
212
+
213
+ <md-switch name="telemetry" selected icons>
214
+ Anonymous analytics
215
+ </md-switch>
216
+
217
+ <div style="margin-top: 16px; display: flex; gap: 12px;">
218
+ <md-button type="reset" variant="outlined">Reset</md-button>
219
+ <md-button type="submit" variant="filled">Submit Form</md-button>
220
+ </div>
221
+ </form>
222
+ ```
223
+
224
+ ### JavaScript Handling
225
+
226
+ ```javascript
227
+ const form = document.getElementById('signup-form');
228
+
229
+ form.addEventListener('submit', (e) => {
230
+ e.preventDefault();
231
+
232
+ if (!form.checkValidity()) {
233
+ form.reportValidity();
234
+ return;
235
+ }
236
+
237
+ const formData = new FormData(form);
238
+ const data = Object.fromEntries(formData.entries());
239
+ console.log('Submitted Payload:', data);
240
+ });
241
+ ```
242
+
243
+ ---
244
+
245
+ ## Framework Integration Guidelines
246
+
247
+ ### React (18 / 19)
248
+
249
+ React 19 supports Custom Elements natively (properties, attributes, and custom events). In React 18, use standard props/attributes or refs for complex events and properties.
250
+
251
+ ```tsx
252
+ import React, { useState } from 'react';
253
+ import '@francofantomius/material-components/button';
254
+ import '@francofantomius/material-components/text-field';
255
+ import '@francofantomius/material-components/switch';
256
+
257
+ export function UserSettings() {
258
+ const [username, setUsername] = useState('Alice');
259
+ const [notifications, setNotifications] = useState(true);
260
+
261
+ return (
262
+ <div>
263
+ <md-text-field
264
+ label="Username"
265
+ value={username}
266
+ onInput={(e: any) => setUsername(e.target.value)}
267
+ />
268
+ <md-switch
269
+ selected={notifications}
270
+ onChange={(e: any) => setNotifications(e.target.selected)}
271
+ >
272
+ Notifications
273
+ </md-switch>
274
+ <md-button variant="filled" onClick={() => console.log('Saved!')}>
275
+ Save Settings
276
+ </md-button>
277
+ </div>
278
+ );
279
+ }
280
+ ```
281
+
282
+ ### Vue 3
283
+
284
+ Configure Vue's compiler to recognize `md-` tags as custom elements in `vite.config.js`:
285
+
286
+ ```javascript
287
+ // vite.config.js
288
+ import { defineConfig } from 'vite';
289
+ import vue from '@vitejs/plugin-vue';
290
+
291
+ export default defineConfig({
292
+ plugins: [
293
+ vue({
294
+ template: {
295
+ compilerOptions: {
296
+ isCustomElement: (tag) => tag.startsWith('md-')
297
+ }
298
+ }
299
+ })
300
+ ]
301
+ });
302
+ ```
303
+
304
+ Use inside SFC template:
305
+
306
+ ```html
307
+ <script setup>
308
+ import { ref } from 'vue';
309
+ import '@francofantomius/material-components/button';
310
+ import '@francofantomius/material-components/switch';
311
+
312
+ const isEnabled = ref(true);
313
+ </script>
314
+
315
+ <template>
316
+ <div>
317
+ <md-switch :selected="isEnabled" @change="isEnabled = !isEnabled">
318
+ Enable Feature
319
+ </md-switch>
320
+ <md-button variant="filled" :disabled="!isEnabled">
321
+ Proceed
322
+ </md-button>
323
+ </div>
324
+ </template>
325
+ ```
326
+
327
+ ### Angular & Svelte
328
+
329
+ - **Angular**: Include `CUSTOM_ELEMENTS_SCHEMA` in `@NgModule({ schemas: [CUSTOM_ELEMENTS_SCHEMA] })` or standalone component definition.
330
+ - **Svelte**: Custom elements work natively with standard property and event bindings without extra wrappers.
331
+
332
+ ---
333
+
334
+ ## Component Index
335
+
336
+ | Category | Component Tag | Subpath Import | Description |
337
+ | :--- | :--- | :--- | :--- |
338
+ | **Actions** | `<md-button>` | `@francofantomius/material-components/button` | Buttons with 5 visual emphasis levels |
339
+ | **Actions** | `<md-button-group>` | `@francofantomius/material-components/button-group` | Button groups with connected shape-shifting or standard layouts |
340
+ | **Actions** | `<md-segmented-button>`, `<md-segmented-button-set>` | `@francofantomius/material-components/segmented-button` | Compact single or multi-select option groups |
341
+ | **Actions** | `<md-split-button>` | `@francofantomius/material-components/split-button` | Primary action button with connected dropdown trigger |
342
+ | **Actions** | `<md-icon-button>` | `@francofantomius/material-components/icon-button` | Compact action & toggle buttons |
343
+ | **Actions** | `<md-fab>` | `@francofantomius/material-components/fab` | Floating Action Button (small, medium, large, extended) |
344
+ | **Actions** | `<md-fab-menu>`, `<md-fab-menu-item>` | `@francofantomius/material-components/fab-menu` | FAB Menu / Speed Dial expanding into stacked sub-actions with labels and modal scrim |
345
+ | **Actions** | `<md-toolbar>` | `@francofantomius/material-components/toolbar` | M3 Expressive floating & docked action toolbar |
346
+ | **Inputs & Controls** | `<md-text-field>` | `@francofantomius/material-components/text-field` | Filled & outlined inputs with validation |
347
+ | **Inputs & Controls** | `<md-checkbox>` | `@francofantomius/material-components/checkbox` | Checkbox with indeterminate and error states |
348
+ | **Inputs & Controls** | `<md-radio>`, `<md-radio-group>` | `@francofantomius/material-components/radio` | Mutually exclusive radio selections |
349
+ | **Inputs & Controls** | `<md-switch>` | `@francofantomius/material-components/switch` | Toggle switch with optional thumb icons |
350
+ | **Inputs & Controls** | `<md-slider>` | `@francofantomius/material-components/slider` | Continuous, discrete, and dual-thumb range sliders |
351
+ | **Inputs & Controls** | `<md-time-picker>` | `@francofantomius/material-components/time-picker` | 12h/24h dial & input time picker with modal and docked modes |
352
+ | **Inputs & Controls** | `<md-date-picker>` | `@francofantomius/material-components/date-picker` | Calendar grid, date range, month/year navigation in modal & docked modes |
353
+ | **Inputs & Controls** | `<md-chip>`, `<md-chip-set>` | `@francofantomius/material-components/chip` | Assist, filter, input, and suggestion chips |
354
+ | **Inputs & Controls** | `<md-search-bar>` | `@francofantomius/material-components/search-bar` | Docked and fullscreen search view |
355
+ | **Surfaces & Containment** | `<md-card>` | `@francofantomius/material-components/card` | Elevated, filled, and outlined surface containers |
356
+ | **Surfaces & Containment** | `<md-dialog>` | `@francofantomius/material-components/dialog` | Modal dialogs for prompts & confirmation |
357
+ | **Surfaces & Containment** | `<md-divider>` | `@francofantomius/material-components/divider` | Horizontal, vertical, and inset separators |
358
+ | **Surfaces & Containment** | `<md-menu>`, `<md-menu-item>` | `@francofantomius/material-components/menu` | Temporary surfaces displaying lists of choices anchored to triggers |
359
+ | **Surfaces & Containment** | `<md-list>`, `<md-list-item>` | `@francofantomius/material-components/list` | 1-line, 2-line, and 3-line structured lists |
360
+ | **Surfaces & Containment** | `<md-table>` | `@francofantomius/material-components/table` | Data table with sorting, selection, and pagination |
361
+ | **Surfaces & Containment** | `<md-side-sheet>` | `@francofantomius/material-components/side-sheet` | Standard in-flow & modal overlay side sheets |
362
+ | **Surfaces & Containment** | `<md-bottom-sheet>` | `@francofantomius/material-components/bottom-sheet` | Standard docked & modal overlay bottom sheets with drag gestures |
363
+ | **Surfaces & Containment** | `<md-carousel>`, `<md-carousel-item>` | `@francofantomius/material-components/carousel` | Multi-browse, hero, and full-width image & content carousels |
364
+ | **Communication & Feedback** | `<md-badge>` | `@francofantomius/material-components/badge` | Numeric count and status dot indicators |
365
+ | **Communication & Feedback** | `<md-progress>` | `@francofantomius/material-components/progress` | Linear and circular progress with M3 wavy lines |
366
+ | **Communication & Feedback** | `<md-loading-indicator>` | `@francofantomius/material-components/loading-indicator` | Contained & morphing shape loading indicator for short wait times |
367
+ | **Communication & Feedback** | `<md-snackbar>` | `@francofantomius/material-components/snackbar` | Temporary bottom toast messages |
368
+ | **Communication & Feedback** | `<md-tooltip>` | `@francofantomius/material-components/tooltip` | Plain & rich contextual tooltips with directional positioning and delays |
369
+ | **Navigation** | `<md-navigation-bar>`, `<md-navigation-bar-item>` | `@francofantomius/material-components/navigation-bar` | Bottom navigation bar with 3-5 destinations, indicator pills, badges & label modes |
370
+ | **Navigation** | `<md-navigation-drawer>` | `@francofantomius/material-components/navigation-drawer` | Side drawer navigation (modal / standard / responsive) |
371
+ | **Navigation** | `<md-navigation-rail>`, `<md-navigation-rail-item>` | `@francofantomius/material-components/navigation-rail` | Vertical navigation rail for mid to large screens |
372
+ | **Navigation** | `<md-top-app-bar>` | `@francofantomius/material-components/top-app-bar` | Header bar (small, center-aligned, medium, large) |
373
+ | **Navigation** | `<md-tabs>`, `<md-tab>` | `@francofantomius/material-components/tabs` | Top tab navigation with sliding active indicator |
374
+ | **Navigation** | `<md-app-drawer>` | `@francofantomius/material-components/app-drawer` | Popover application grid launcher with drag reordering |
375
+ | **Navigation** | `<md-account-menu>` | `@francofantomius/material-components/account-menu` | Account switcher, credentials, security & storage popover |
376
+ | **Media & Playback** | `<md-player>` | `@francofantomius/material-components/player` | Audio & video player with scrubber, queue, and volume |
377
+ | **Utilities & Data** | `<md-icon>` | `@francofantomius/material-components/icon` | Material Symbols font icon wrapper |
378
+ | **Utilities & Data** | `<md-code>` | `@francofantomius/material-components/code` | Syntax highlighter with real-time multi-language linting |
379
+
380
+ ---
381
+
382
+ ## Component Reference
383
+
384
+ ### Actions
385
+
386
+ #### Button (`md-button`)
387
+
388
+ - **Subpath**: `@francofantomius/material-components/button`
389
+ - **Description**: Buttons help users initiate actions and choices with five distinct levels of visual emphasis: filled, elevated, tonal, outlined, and text.
390
+
391
+ ##### Properties & Attributes
392
+ | Name | Type | Default | Description |
393
+ | :--- | :--- | :--- | :--- |
394
+ | `variant` | `'filled' \| 'elevated' \| 'tonal' \| 'outlined' \| 'text'` | `'filled'` | Visual emphasis style of the button |
395
+ | `disabled` | `boolean` | `false` | Whether the button is interactive or disabled |
396
+ | `loading` | `boolean` | `false` | Displays an internal circular progress spinner and disables click |
397
+ | `icon` | `string` | `''` | Leading Material Symbols icon name |
398
+ | `trailing-icon` | `string` | `''` | Trailing Material Symbols icon name |
399
+ | `type` | `'button' \| 'submit' \| 'reset'` | `'button'` | HTML form button type |
400
+ | `href` | `string` | `''` | When provided, renders as an accessible anchor link |
401
+ | `target` | `string` | `''` | Link target attribute (e.g., `_blank`) |
402
+
403
+ ##### Code Example
404
+ ```html
405
+ <md-button variant="filled">Filled</md-button>
406
+ <md-button variant="elevated">Elevated</md-button>
407
+ <md-button variant="tonal">Tonal</md-button>
408
+ <md-button variant="outlined">Outlined</md-button>
409
+ <md-button variant="text">Text</md-button>
410
+ <md-button variant="filled" icon="add">Create New</md-button>
411
+ <md-button variant="outlined" trailing-icon="arrow_forward">Next Step</md-button>
412
+ <md-button variant="tonal" loading>Saving...</md-button>
413
+ <md-button variant="outlined" href="https://material.io" target="_blank" trailing-icon="open_in_new">
414
+ Material Design Docs
415
+ </md-button>
416
+ ```
417
+
418
+ ---
419
+
420
+ #### Button Group (`md-button-group`)
421
+
422
+ - **Subpath**: `@francofantomius/material-components/button-group`
423
+ - **Description**: Button groups organize related action buttons into cohesive sets with standard or connected shape-shifting layouts according to Material Design 3 specifications.
424
+
425
+ ##### Properties & Attributes
426
+ | Name | Type | Default | Description |
427
+ | :--- | :--- | :--- | :--- |
428
+ | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Layout orientation of the button group |
429
+ | `connected` | `boolean` | `false` | Connects adjacent buttons with seamless shared borders and shape-shifting corner radii |
430
+ | `shape` | `'pill' \| 'rounded' \| 'square'` | `'pill'` | Corner shape morphing style when connected |
431
+ | `variant` | `'filled' \| 'elevated' \| 'tonal' \| 'outlined' \| 'text'` | `''` | Cascades a visual emphasis style to child buttons |
432
+ | `full-width` | `boolean` | `false` | Stretches child buttons evenly across the container width |
433
+ | `disabled` | `boolean` | `false` | Disables all child buttons in the group |
434
+
435
+ ##### Code Example
436
+ ```html
437
+ <!-- Standard Button Group -->
438
+ <md-button-group>
439
+ <md-button variant="outlined" icon="edit">Edit</md-button>
440
+ <md-button variant="outlined" icon="content_copy">Copy</md-button>
441
+ <md-button variant="filled" icon="share">Share</md-button>
442
+ </md-button-group>
443
+
444
+ <!-- Connected Shape-Shifting Group -->
445
+ <md-button-group connected variant="outlined">
446
+ <md-button icon="format_align_left">Left</md-button>
447
+ <md-button icon="format_align_center">Center</md-button>
448
+ <md-button icon="format_align_right">Right</md-button>
449
+ </md-button-group>
450
+
451
+ <!-- Vertical Connected Group -->
452
+ <md-button-group connected orientation="vertical" variant="outlined">
453
+ <md-button icon="zoom_in">Zoom In</md-button>
454
+ <md-button icon="zoom_out">Zoom Out</md-button>
455
+ <md-button icon="fit_screen">Reset</md-button>
456
+ </md-button-group>
457
+ ```
458
+
459
+ ---
460
+
461
+ #### Segmented Button (`md-segmented-button`, `md-segmented-button-set`)
462
+
463
+ - **Subpath**: `@francofantomius/material-components/segmented-button`
464
+ - **Description**: Segmented buttons help users select options, switch views, or sort elements in compact single-select or multi-select groups.
465
+
466
+ ##### Properties & Attributes (`md-segmented-button-set`)
467
+ | Name | Type | Default | Description |
468
+ | :--- | :--- | :--- | :--- |
469
+ | `multiselect` | `boolean` | `false` | Enables multi-selection mode across segments |
470
+ | `disabled` | `boolean` | `false` | Disables all child segmented buttons in the set |
471
+
472
+ ##### Properties & Attributes (`md-segmented-button`)
473
+ | Name | Type | Default | Description |
474
+ | :--- | :--- | :--- | :--- |
475
+ | `selected` | `boolean` | `false` | Active selection state of the segment |
476
+ | `disabled` | `boolean` | `false` | Disables segment interactions |
477
+ | `value` | `string` | `''` | Value associated with the segment |
478
+ | `label` | `string` | `''` | Label text of the segment |
479
+ | `icon` | `string` | `''` | Leading Material Symbols icon name |
480
+ | `no-checkmark` | `boolean` | `false` | Hides the automatic checkmark indicator when selected |
481
+
482
+ ##### Code Example
483
+ ```html
484
+ <!-- Single select (e.g. view filter) -->
485
+ <md-segmented-button-set>
486
+ <md-segmented-button selected label="Songs"></md-segmented-button>
487
+ <md-segmented-button label="Albums"></md-segmented-button>
488
+ <md-segmented-button label="Podcasts"></md-segmented-button>
489
+ </md-segmented-button-set>
490
+
491
+ <!-- Multi select (e.g. text formatting) -->
492
+ <md-segmented-button-set multiselect>
493
+ <md-segmented-button icon="format_bold" label="Bold" selected></md-segmented-button>
494
+ <md-segmented-button icon="format_italic" label="Italic"></md-segmented-button>
495
+ <md-segmented-button icon="format_underlined" label="Underline"></md-segmented-button>
496
+ </md-segmented-button-set>
497
+ ```
498
+
499
+ ---
500
+
501
+ #### Split Button (`md-split-button`)
502
+
503
+ - **Subpath**: `@francofantomius/material-components/split-button`
504
+ - **Description**: Split buttons combine a primary action button with a connected dropdown trigger button for related contextual options.
505
+
506
+ ##### Properties & Attributes
507
+ | Name | Type | Default | Description |
508
+ | :--- | :--- | :--- | :--- |
509
+ | `variant` | `'filled' \| 'elevated' \| 'tonal' \| 'outlined'` | `'filled'` | Visual emphasis style of the split button |
510
+ | `disabled` | `boolean` | `false` | Disables both action and menu trigger buttons |
511
+ | `label` | `string` | `''` | Primary action button text label |
512
+ | `icon` | `string` | `''` | Leading icon for the primary action button |
513
+ | `trailing-icon` | `string` | `'arrow_drop_down'` | Dropdown trigger icon name |
514
+ | `open` | `boolean` | `false` | Whether the associated menu / options dropdown is open |
515
+ | `type` | `'button' \| 'submit' \| 'reset'` | `'button'` | HTML form button type for the main action |
516
+ | `action-aria-label` | `string` | `''` | Accessible label for the main action button |
517
+ | `menu-aria-label` | `string` | `'More options'` | Accessible label for the trailing menu trigger button |
518
+
519
+ ##### Events
520
+ | Name | Detail | Description |
521
+ | :--- | :--- | :--- |
522
+ | `action` | `{ target: MdSplitButton, open: boolean }` | Dispatched when the leading primary action button is clicked |
523
+ | `trailing-click` | `{ target: MdSplitButton, open: boolean }` | Dispatched when the trailing dropdown menu button is clicked |
524
+ | `toggle` | `{ target: MdSplitButton, open: boolean }` | Dispatched when the trailing menu trigger toggles open state |
525
+
526
+ ##### Code Example
527
+ ```html
528
+ <!-- Default filled split button -->
529
+ <md-split-button label="Save"></md-split-button>
530
+
531
+ <!-- Split button with icons and tonal variant -->
532
+ <md-split-button variant="tonal" icon="cloud_upload" label="Upload" trailing-icon="expand_more"></md-split-button>
533
+
534
+ <!-- Outlined split button -->
535
+ <md-split-button variant="outlined" label="Export"></md-split-button>
536
+ ```
537
+
538
+ ---
539
+
540
+ #### Icon Button (`md-icon-button`)
541
+
542
+ - **Subpath**: `@francofantomius/material-components/icon-button`
543
+ - **Description**: Icon buttons allow users to take compact actions and toggle choices with a single tap, supporting standard, filled, tonal, and outlined variants.
544
+
545
+ ##### Properties & Attributes
546
+ | Name | Type | Default | Description |
547
+ | :--- | :--- | :--- | :--- |
548
+ | `variant` | `'standard' \| 'filled' \| 'tonal' \| 'outlined'` | `'standard'` | Visual container style |
549
+ | `icon` | `string` | `''` | Material Symbols icon name |
550
+ | `selected-icon` | `string` | `''` | Icon displayed when toggle button is active |
551
+ | `toggle` | `boolean` | `false` | Enables two-state toggle behavior |
552
+ | `selected` | `boolean` | `false` | Active selection state for toggle buttons |
553
+ | `disabled` | `boolean` | `false` | Disables button interactions |
554
+ | `href` | `string` | `''` | Renders as hyperlink when present |
555
+
556
+ ##### Code Example
557
+ ```html
558
+ <md-icon-button icon="favorite" variant="standard" aria-label="Favorite"></md-icon-button>
559
+ <md-icon-button icon="star" variant="filled" aria-label="Bookmark"></md-icon-button>
560
+ <md-icon-button icon="settings" variant="tonal" aria-label="Settings"></md-icon-button>
561
+ <md-icon-button icon="share" variant="outlined" aria-label="Share"></md-icon-button>
562
+
563
+ <!-- Toggle Icon Buttons -->
564
+ <md-icon-button toggle icon="bookmark_border" selected-icon="bookmark" aria-label="Bookmark"></md-icon-button>
565
+ <md-icon-button toggle variant="tonal" icon="notifications_none" selected-icon="notifications" aria-label="Alerts"></md-icon-button>
566
+ ```
567
+
568
+ ---
569
+
570
+ #### Floating Action Button (`md-fab`)
571
+
572
+ - **Subpath**: `@francofantomius/material-components/fab`
573
+ - **Description**: A Floating Action Button (FAB) performs the primary, most common action on a screen. Supports small, medium, large, and extended modes.
574
+
575
+ ##### Properties & Attributes
576
+ | Name | Type | Default | Description |
577
+ | :--- | :--- | :--- | :--- |
578
+ | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Container dimension |
579
+ | `icon` | `string` | `''` | Material Symbols icon name |
580
+ | `label` | `string` | `''` | Extended text label (renders extended FAB) |
581
+ | `lowered` | `boolean` | `false` | Applies lower elevation level 1 instead of level 3 |
582
+ | `disabled` | `boolean` | `false` | Disables button interaction |
583
+
584
+ ##### Code Example
585
+ ```html
586
+ <md-fab size="small" icon="edit" aria-label="Edit"></md-fab>
587
+ <md-fab icon="add" label="New Message"></md-fab>
588
+ <md-fab size="large" icon="palette" aria-label="Palette"></md-fab>
589
+ <md-fab icon="download" lowered aria-label="Download"></md-fab>
590
+ ```
591
+
592
+ ---
593
+
594
+ #### FAB Menu (`md-fab-menu`, `md-fab-menu-item`)
595
+
596
+ - **Subpath**: `@francofantomius/material-components/fab-menu`
597
+ - **Description**: A Floating Action Button Menu (FAB Menu / Speed Dial) expands a primary FAB into a stack of contextual sub-actions with text labels, animated transitions, and optional modal scrim overlay.
598
+
599
+ ##### Properties & Attributes (`md-fab-menu`)
600
+ | Name | Type | Default | Description |
601
+ | :--- | :--- | :--- | :--- |
602
+ | `open` | `boolean` | `false` | Whether the menu stack is open |
603
+ | `modal` | `boolean` | `false` | Displays a scrim backdrop overlay behind the open menu |
604
+ | `direction` | `'up' \| 'down' \| 'left' \| 'right'` | `'up'` | Direction the sub-action stack expands |
605
+ | `icon` | `string` | `'add'` | Material Symbols icon for the trigger FAB |
606
+ | `open-icon` | `string` | `''` | Optional distinct icon shown when opened (defaults to 45° rotation) |
607
+ | `label` | `string` | `''` | Extended text label for the trigger FAB |
608
+ | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Trigger FAB button size |
609
+ | `lowered` | `boolean` | `false` | Applies lower elevation level 1 instead of level 3 |
610
+ | `disabled` | `boolean` | `false` | Disables menu trigger and interactions |
611
+ | `close-on-item-click` | `boolean` | `true` | Automatically closes menu when a sub-item is clicked |
612
+ | `close-on-outside-click` | `boolean` | `true` | Automatically closes menu when clicking outside |
613
+
614
+ ##### Properties & Attributes (`md-fab-menu-item`)
615
+ | Name | Type | Default | Description |
616
+ | :--- | :--- | :--- | :--- |
617
+ | `icon` | `string` | `''` | Material Symbols icon name for the sub-action |
618
+ | `label` | `string` | `''` | Text label displayed beside the mini-FAB |
619
+ | `label-placement` | `'start' \| 'end' \| 'top' \| 'bottom'` | `'start'` | Positioning of the label pill relative to the sub-FAB |
620
+ | `disabled` | `boolean` | `false` | Disables sub-action item interactions |
621
+ | `value` | `string` | `''` | Value or identifier for the action |
622
+ | `size` | `'small' \| 'medium'` | `'small'` | Size of the mini-FAB button |
623
+ | `lowered` | `boolean` | `false` | Lower elevation level |
624
+
625
+ ##### Events
626
+ | Name | Detail | Description |
627
+ | :--- | :--- | :--- |
628
+ | `open` | `undefined` | Dispatched when the FAB menu opens |
629
+ | `close` | `undefined` | Dispatched when the FAB menu closes |
630
+ | `toggle` | `{ open: boolean }` | Dispatched when the menu toggles open/close state |
631
+ | `action` | `{ item: MdFabMenuItem, value: string, label: string }` | Dispatched when a sub-action item is activated |
632
+ | `scrim-click` | `undefined` | Dispatched when modal scrim backdrop is clicked |
633
+
634
+ ##### Code Example
635
+ ```html
636
+ <!-- Standard Upward FAB Menu -->
637
+ <md-fab-menu icon="add">
638
+ <md-fab-menu-item icon="edit" label="Create Post" value="post"></md-fab-menu-item>
639
+ <md-fab-menu-item icon="photo_camera" label="Upload Photo" value="photo"></md-fab-menu-item>
640
+ <md-fab-menu-item icon="videocam" label="Go Live" value="live"></md-fab-menu-item>
641
+ </md-fab-menu>
642
+
643
+ <!-- Modal FAB Menu with Scrim -->
644
+ <md-fab-menu modal icon="add" label="Actions">
645
+ <md-fab-menu-item icon="mail" label="New Message" value="email"></md-fab-menu-item>
646
+ <md-fab-menu-item icon="event" label="Schedule Event" value="event"></md-fab-menu-item>
647
+ </md-fab-menu>
648
+ ```
649
+
650
+ ---
651
+
652
+ #### Toolbar (`md-toolbar`)
653
+
654
+ - **Subpath**: `@francofantomius/material-components/toolbar`
655
+ - **Description**: Material Design 3 Expressive Action Toolbar for housing actions, tools, controls, and integrated floating action buttons in floating island or docked edge-to-edge layouts.
656
+
657
+ ##### Properties & Attributes
658
+ | Name | Type | Default | Description |
659
+ | :--- | :--- | :--- | :--- |
660
+ | `mode` | `'floating' \| 'docked'` | `'floating'` | Layout mode: floating island or docked bar |
661
+ | `docked` | `boolean` | `false` | Shorthand boolean to activate docked mode |
662
+ | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Controls layout orientation |
663
+ | `elevated` | `boolean` | `false` | Increases elevation shadow depth |
664
+ | `fixed` | `boolean` | `false` | Pins position relative to viewport |
665
+ | `dock-position` | `'none' \| 'top' \| 'bottom' \| 'left' \| 'right'` | `'none'` | Viewport edge when docked and fixed |
666
+ | `aria-label` | `string` | `''` | Accessible label for screen readers |
667
+
668
+ ##### Slots
669
+ | Slot Name | Description |
670
+ | :--- | :--- |
671
+ | *(default)* | Primary action buttons, segmented buttons, switches, and dividers |
672
+ | `leading` | Leading navigation or anchor icons |
673
+ | `trailing` | Trailing action buttons or overflow menus |
674
+ | `fab` / `action` | Slotted Primary Action / Floating Action Button (FAB) |
675
+
676
+ ##### Code Example
677
+ ```html
678
+ <!-- Floating Action Toolbar -->
679
+ <md-toolbar aria-label="Formatting Actions">
680
+ <md-icon-button icon="format_bold" aria-label="Bold"></md-icon-button>
681
+ <md-icon-button icon="format_italic" aria-label="Italic"></md-icon-button>
682
+ <md-divider vertical></md-divider>
683
+ <md-icon-button icon="format_align_left" aria-label="Align left"></md-icon-button>
684
+ <md-fab slot="fab" size="small" icon="edit" aria-label="Edit"></md-fab>
685
+ </md-toolbar>
686
+
687
+ <!-- Docked Bottom Toolbar -->
688
+ <md-toolbar mode="docked" aria-label="Document Controls">
689
+ <div slot="leading">
690
+ <md-icon-button icon="attachment" aria-label="Attach"></md-icon-button>
691
+ </div>
692
+ <div slot="trailing">
693
+ <md-button variant="filled" label="Publish"></md-button>
694
+ </div>
695
+ </md-toolbar>
696
+ ```
697
+
698
+ ---
699
+
700
+ ### Inputs & Controls
701
+
702
+ #### Text Field (`md-text-field`)
703
+
704
+ - **Subpath**: `@francofantomius/material-components/text-field`
705
+ - **Description**: Text fields allow users to enter and edit text, supporting filled and outlined variants, floating labels, validation states, and prefix/suffix text.
706
+
707
+ ##### Properties & Attributes
708
+ | Name | Type | Default | Description |
709
+ | :--- | :--- | :--- | :--- |
710
+ | `variant` | `'filled' \| 'outlined'` | `'filled'` | Container visual style |
711
+ | `label` | `string` | `''` | Floating label text |
712
+ | `value` | `string` | `''` | Current input value |
713
+ | `type` | `string` | `'text'` | Input type (`text`, `email`, `password`, `number`, etc.) |
714
+ | `placeholder` | `string` | `''` | Placeholder displayed when focused |
715
+ | `prefix-text` | `string` | `''` | Affix text before the value |
716
+ | `suffix-text` | `string` | `''` | Affix text after the value |
717
+ | `supporting-text` | `string` | `''` | Helper text below the field |
718
+ | `error` | `boolean` | `false` | Forces input into error visual state |
719
+ | `error-text` | `string` | `''` | Error message shown when error is true |
720
+ | `leading-icon` | `string` | `''` | Material Symbols leading icon |
721
+ | `trailing-icon` | `string` | `''` | Material Symbols trailing icon |
722
+ | `maxlength` | `number` | `-1` | Maximum character length with visual counter |
723
+ | `required` | `boolean` | `false` | Form validation required constraint |
724
+ | `disabled` | `boolean` | `false` | Disables user input |
725
+ | `readonly` | `boolean` | `false` | Prevents text editing |
726
+
727
+ ##### Code Example
728
+ ```html
729
+ <md-text-field label="Full Name" supporting-text="Your legal name"></md-text-field>
730
+ <md-text-field variant="outlined" label="Email Address" type="email" leading-icon="mail"></md-text-field>
731
+ <md-text-field variant="outlined" label="Price" prefix-text="$" suffix-text=".00" value="99"></md-text-field>
732
+ <md-text-field variant="outlined" label="Bio" maxlength="50" supporting-text="Max 50 characters"></md-text-field>
733
+ <md-text-field variant="outlined" label="Password" type="password" error error-text="Password must be at least 8 characters" value="pass"></md-text-field>
734
+ ```
735
+
736
+ ---
737
+
738
+ #### Checkbox (`md-checkbox`)
739
+
740
+ - **Subpath**: `@francofantomius/material-components/checkbox`
741
+ - **Description**: Checkboxes allow users to select one or more items from a set, or toggle between checked, unchecked, and indeterminate states.
742
+
743
+ ##### Properties & Attributes
744
+ | Name | Type | Default | Description |
745
+ | :--- | :--- | :--- | :--- |
746
+ | `checked` | `boolean` | `false` | Checked state |
747
+ | `indeterminate` | `boolean` | `false` | Partially selected state |
748
+ | `disabled` | `boolean` | `false` | Disables user interaction |
749
+ | `required` | `boolean` | `false` | Form validation constraint |
750
+ | `error` | `boolean` | `false` | Applies error color styling |
751
+ | `name` | `string` | `''` | HTML form input name |
752
+ | `value` | `string` | `'on'` | HTML form submitted value |
753
+
754
+ ##### Code Example
755
+ ```html
756
+ <md-checkbox checked>I agree to terms</md-checkbox>
757
+ <md-checkbox indeterminate>Select all children</md-checkbox>
758
+ <md-checkbox>Unchecked option</md-checkbox>
759
+ <md-checkbox disabled checked>Disabled selection</md-checkbox>
760
+ ```
761
+
762
+ ---
763
+
764
+ #### Radio & Radio Group (`md-radio`, `md-radio-group`)
765
+
766
+ - **Subpath**: `@francofantomius/material-components/radio`
767
+ - **Description**: Radio buttons allow users to select exactly one option from a set of mutually exclusive choices, organized within an `md-radio-group`.
768
+
769
+ ##### `<md-radio>` Properties
770
+ | Name | Type | Default | Description |
771
+ | :--- | :--- | :--- | :--- |
772
+ | `checked` | `boolean` | `false` | Checked state of `md-radio` |
773
+ | `value` | `string` | `'on'` | Value associated with `md-radio` |
774
+ | `disabled` | `boolean` | `false` | Disables this radio button |
775
+
776
+ ##### `<md-radio-group>` Properties
777
+ | Name | Type | Default | Description |
778
+ | :--- | :--- | :--- | :--- |
779
+ | `name` | `string` | `''` | Group name shared across radio buttons |
780
+ | `value` | `string` | `''` | Currently selected radio value |
781
+ | `row` | `boolean` | `false` | Arranges radio items horizontally |
782
+
783
+ ##### Code Example
784
+ ```html
785
+ <md-radio-group name="shipping" value="express">
786
+ <md-radio value="standard">Standard Shipping (3-5 days)</md-radio>
787
+ <md-radio value="express">Express Delivery (1-2 days)</md-radio>
788
+ <md-radio value="overnight" disabled>Overnight Priority (Unavailable)</md-radio>
789
+ </md-radio-group>
790
+
791
+ <md-radio-group row name="size" value="m">
792
+ <md-radio value="s">Small</md-radio>
793
+ <md-radio value="m">Medium</md-radio>
794
+ <md-radio value="l">Large</md-radio>
795
+ </md-radio-group>
796
+ ```
797
+
798
+ ---
799
+
800
+ #### Switch (`md-switch`)
801
+
802
+ - **Subpath**: `@francofantomius/material-components/switch`
803
+ - **Description**: Switches toggle the state of a single setting on or off, with optional check and cross icons inside the thumb.
804
+
805
+ ##### Properties & Attributes
806
+ | Name | Type | Default | Description |
807
+ | :--- | :--- | :--- | :--- |
808
+ | `selected` | `boolean` | `false` | On/Off toggle state |
809
+ | `icons` | `boolean` | `false` | Displays check and cross icons inside thumb |
810
+ | `disabled` | `boolean` | `false` | Disables user interaction |
811
+ | `name` | `string` | `''` | HTML form input name |
812
+ | `value` | `string` | `'on'` | HTML form submitted value |
813
+
814
+ ##### Code Example
815
+ ```html
816
+ <md-switch selected icons>Wi-Fi</md-switch>
817
+ <md-switch selected>Bluetooth</md-switch>
818
+ <md-switch disabled>Airplane Mode</md-switch>
819
+ ```
820
+
821
+ ---
822
+
823
+ #### Slider (`md-slider`)
824
+
825
+ - **Subpath**: `@francofantomius/material-components/slider`
826
+ - **Description**: Sliders allow users to view and select a value (or range of values) along a horizontal track, supporting continuous or discrete steps, dual-thumb range selection, value indicator balloon tooltips, and leading/trailing icons.
827
+
828
+ ##### Properties & Attributes
829
+ | Name | Type | Default | Description |
830
+ | :--- | :--- | :--- | :--- |
831
+ | `value` | `number` | `50` | Current value for single slider mode |
832
+ | `value-start` | `number` | `0` | Start value for dual-thumb range mode |
833
+ | `value-end` | `number` | `100` | End value for dual-thumb range mode |
834
+ | `min` | `number` | `0` | Minimum allowed value |
835
+ | `max` | `number` | `100` | Maximum allowed value |
836
+ | `step` | `number` | `1` | Granularity step increment |
837
+ | `range` | `boolean` | `false` | Enables dual-thumb range selection mode |
838
+ | `ticks` | `boolean` | `false` | Displays discrete step tick marks along the track |
839
+ | `labeled` | `boolean` | `false` | Shows floating value indicator balloon tooltip above thumb |
840
+ | `icon` | `string` | `''` | Leading Material Symbols icon name |
841
+ | `leading-icon` | `string` | `''` | Leading Material Symbols icon name |
842
+ | `trailing-icon` | `string` | `''` | Trailing Material Symbols icon name |
843
+ | `disabled` | `boolean` | `false` | Disables user interaction |
844
+ | `name` | `string` | `''` | HTML form input name |
845
+ | `name-start` | `string` | `''` | HTML form input name for start value (range mode) |
846
+ | `name-end` | `string` | `''` | HTML form input name for end value (range mode) |
847
+
848
+ ##### Slots
849
+ - `leading-icon`: Custom leading icon or element.
850
+ - `trailing-icon`: Custom trailing icon or element.
851
+
852
+ ##### Events
853
+ - `input`: Dispatched continuously while dragging or adjusting with keys (`detail: { value, valueStart, valueEnd }`).
854
+ - `change`: Dispatched on pointer release or committed keyboard change (`detail: { value, valueStart, valueEnd }`).
855
+
856
+ ##### Code Example
857
+ ```html
858
+ <!-- Continuous Slider with Icons -->
859
+ <md-slider value="60" icon="volume_down" trailing-icon="volume_up"></md-slider>
860
+
861
+ <!-- Discrete Stepped Slider with Ticks & Value Indicator -->
862
+ <md-slider min="0" max="100" step="10" value="40" ticks labeled></md-slider>
863
+
864
+ <!-- Dual-Thumb Range Slider -->
865
+ <md-slider range min="0" max="100" value-start="20" value-end="80" labeled></md-slider>
866
+
867
+ <!-- Disabled Slider -->
868
+ <md-slider value="50" disabled icon="lock"></md-slider>
869
+ ```
870
+
871
+ ---
872
+
873
+ #### Chip & Chip Set (`md-chip`, `md-chip-set`)
874
+
875
+ - **Subpath**: `@francofantomius/material-components/chip`
876
+ - **Description**: Chips help users enter information, make selections, filter content, or trigger actions across assist, filter, input, and suggestion variants.
877
+
878
+ ##### Properties & Attributes
879
+ | Name | Type | Default | Description |
880
+ | :--- | :--- | :--- | :--- |
881
+ | `variant` | `'assist' \| 'filter' \| 'input' \| 'suggestion'` | `'assist'` | Chip visual and interaction style |
882
+ | `label` | `string` | `''` | Chip text content |
883
+ | `icon` | `string` | `''` | Material Symbols leading icon |
884
+ | `selected` | `boolean` | `false` | Selected state for filter chips |
885
+ | `removable` | `boolean` | `false` | Shows trailing remove button for input chips |
886
+ | `disabled` | `boolean` | `false` | Disables chip interactions |
887
+
888
+ ##### Code Example
889
+ ```html
890
+ <md-chip-set>
891
+ <md-chip variant="assist" icon="event" label="Add to Calendar"></md-chip>
892
+ <md-chip variant="filter" selected label="Material 3"></md-chip>
893
+ <md-chip variant="input" label="Removable Tag" removable></md-chip>
894
+ <md-chip variant="suggestion" label="Suggested Query"></md-chip>
895
+ </md-chip-set>
896
+ ```
897
+
898
+ ---
899
+
900
+ #### Search Bar (`md-search-bar`)
901
+
902
+ - **Subpath**: `@francofantomius/material-components/search-bar`
903
+ - **Description**: Search bars allow users to enter queries and view search suggestions in docked or full-screen responsive views, following Material Design 3 guidelines.
904
+
905
+ ##### Properties & Attributes
906
+ | Name | Type | Default | Description |
907
+ | :--- | :--- | :--- | :--- |
908
+ | `value` | `string` | `''` | Current query value in the search bar |
909
+ | `placeholder` | `string` | `'Search'` | Placeholder label for the input |
910
+ | `active` | `boolean` | `false` | Controls whether search view is expanded and showing suggestions |
911
+ | `suggestions` | `Array<string \| SearchSuggestion>` | `[]` | List of search suggestions with labels, supporting text, and icons |
912
+ | `leading-icon` | `string` | `'search'` | Leading icon displayed when inactive |
913
+ | `active-leading-icon` | `string` | `'arrow_back'` | Leading icon displayed when active |
914
+ | `trailing-icon` | `string` | `''` | Optional trailing action icon |
915
+ | `show-back-button` | `boolean` | `true` | Whether to show the back button in active mode |
916
+ | `responsive` | `boolean` | `true` | Automatically switches to full-screen view and collapsed search icon on mobile (<= 768px) |
917
+ | `collapse-on-mobile` | `boolean` | `true` | Collapses search bar into a compact search icon button on mobile screens when inactive |
918
+ | `fullscreen` | `boolean` | `false` | Forces full-screen search view overlay when active |
919
+ | `disabled` | `boolean` | `false` | Disables user interaction |
920
+
921
+ ##### Slots
922
+ - `leading-icon`: Custom leading icon or button element.
923
+ - `trailing-icon`: Custom trailing action buttons, avatar, or mic.
924
+ - `suggestions`: Custom slotted suggestions list.
925
+ - `(default)`: Additional content rendered inside active search surface.
926
+
927
+ ##### Events
928
+ - `input`: Fired as user types (`detail: { value: string }`).
929
+ - `change`: Fired on committed input change (`detail: { value: string }`).
930
+ - `search`: Fired when user presses Enter or selects a suggestion (`detail: { value: string, suggestion?: object }`).
931
+ - `active-change`: Fired when search bar expands/collapses (`detail: { active: boolean }`).
932
+ - `suggestion-select`: Fired when a suggestion is selected (`detail: { suggestion: object, value: string, index: number }`).
933
+ - `clear`: Fired when search value is cleared.
934
+
935
+ ##### Code Example
936
+ ```html
937
+ <md-search-bar
938
+ id="demo-search-bar"
939
+ placeholder="Search destinations, hotels, flights..."
940
+ trailing-icon="mic"
941
+ ></md-search-bar>
942
+
943
+ <!-- Custom Slotted Content in Active State -->
944
+ <md-search-bar placeholder="Search files & documents">
945
+ <div style="padding: 12px 16px;">
946
+ <p style="margin: 0 0 8px 0; font-size: 13px; font-weight: 500;">Recent Searches</p>
947
+ <div style="display: flex; gap: 8px; flex-wrap: wrap;">
948
+ <md-chip label="Q4 Financial Report" icon="history"></md-chip>
949
+ <md-chip label="Design System M3" icon="history"></md-chip>
950
+ </div>
951
+ </div>
952
+ </md-search-bar>
953
+ ```
954
+
955
+ ---
956
+
957
+ #### Time Picker (`md-time-picker`)
958
+
959
+ - **Subpath**: `@francofantomius/material-components/time-picker`
960
+ - **Description**: Time pickers help users select and set a specific time using an interactive Material Design 3 clock dial or numeric text inputs, in both 12-hour (AM/PM) and 24-hour formats with modal or docked modes.
961
+
962
+ ##### Properties & Attributes
963
+ | Name | Type | Default | Description |
964
+ | :--- | :--- | :--- | :--- |
965
+ | `value` | `string` | `''` | Current time value string (e.g. `'08:30 AM'` or `'14:30'`) |
966
+ | `format` | `'12h' \| '24h'` | `'12h'` | Time display and selection format |
967
+ | `view` | `'dial' \| 'input'` | `'dial'` | Active presentation mode: interactive clock dial or numeric text fields |
968
+ | `modal` | `boolean` | `false` | Displays picker as a modal dialog overlay with backdrop scrim |
969
+ | `open` | `boolean` | `false` | Controls open/close visibility state when in modal mode |
970
+ | `headline` | `string` | `'Select time'` | Header headline text |
971
+ | `auto-switch-to-minute` | `boolean` | `true` | Automatically transitions active field from hour to minute on dial |
972
+ | `disabled` | `boolean` | `false` | Disables user interaction |
973
+ | `name` | `string` | `''` | HTML form input name (FACE) |
974
+ | `required` | `boolean` | `false` | Form validation required constraint |
975
+
976
+ ##### Methods
977
+ - `showModal()`: Opens the time picker as a modal dialog.
978
+ - `show()`: Opens the time picker.
979
+ - `close(returnValue?: string)`: Closes the modal time picker.
980
+ - `confirm()`: Commits the selected time and fires `change` / `confirm` events.
981
+ - `cancel()`: Cancels selection and dismisses modal dialog.
982
+ - `getFormattedTime()`: Returns current formatted time according to `format`.
983
+ - `getFormatted24()`: Returns current time in 24-hour `'HH:MM'` format.
984
+ - `getFormatted12()`: Returns current time in 12-hour `'hh:mm A'` format.
985
+
986
+ ##### Events
987
+ - `change`: Dispatched when a time value is confirmed or committed (`detail: { value, hour, minute, period, formatted24, formatted12 }`).
988
+ - `input`: Dispatched during interactive time adjustment (`detail: { value, hour, minute, period, formatted24, formatted12 }`).
989
+ - `confirm`: Dispatched when the user clicks OK (`detail: { value, hour, minute, period, formatted24, formatted12 }`).
990
+ - `cancel`: Dispatched when selection is canceled or backdrop is clicked.
991
+ - `open`: Dispatched when modal dialog opens.
992
+ - `close`: Dispatched when modal dialog closes (`detail: { returnValue?: string }`).
993
+
994
+ ##### Code Example
995
+ ```html
996
+ <!-- 12-hour Clock Dial Picker -->
997
+ <md-time-picker format="12h" value="09:30 AM"></md-time-picker>
998
+
999
+ <!-- 24-hour Text Input Mode -->
1000
+ <md-time-picker view="input" format="24h" value="14:45"></md-time-picker>
1001
+
1002
+ <!-- Modal Time Picker with Trigger Button -->
1003
+ <md-button variant="filled" icon="schedule" onclick="document.getElementById('alarm-picker').showModal()">
1004
+ Set Alarm
1005
+ </md-button>
1006
+ <md-time-picker id="alarm-picker" modal headline="Set Alarm" value="07:00 AM"></md-time-picker>
1007
+ ```
1008
+
1009
+ ---
1010
+
1011
+ #### Date Picker (`md-date-picker`)
1012
+
1013
+ - **Subpath**: `@francofantomius/material-components/date-picker`
1014
+ - **Description**: Date pickers let people select a date or range of dates using an interactive calendar grid, month/year navigation, and Material Design 3 styling in docked and modal dialog formats.
1015
+
1016
+ ##### Properties & Attributes
1017
+ | Name | Type | Default | Description |
1018
+ | :--- | :--- | :--- | :--- |
1019
+ | `variant` | `'docked' \| 'modal'` | `'docked'` | Presentation format: inline/docked container or modal dialog overlay |
1020
+ | `range` | `boolean` | `false` | Enables date range selection mode (start date and end date) |
1021
+ | `value` | `string` | `''` | Selected date string (ISO `'YYYY-MM-DD'` or `'YYYY-MM-DD/YYYY-MM-DD'` for range) |
1022
+ | `start-date` | `string` | `''` | Start date in range selection mode |
1023
+ | `end-date` | `string` | `''` | End date in range selection mode |
1024
+ | `min` | `string` | `''` | Minimum selectable date constraint (ISO `'YYYY-MM-DD'`) |
1025
+ | `max` | `string` | `''` | Maximum selectable date constraint (ISO `'YYYY-MM-DD'`) |
1026
+ | `label` | `string` | `''` | Header subhead / supporting label text (e.g. `'Select date'`) |
1027
+ | `headline` | `string` | `''` | Custom header headline text (defaults to formatted date) |
1028
+ | `open` | `boolean` | `false` | Controls open/close visibility state when in modal mode |
1029
+ | `disabled` | `boolean` | `false` | Disables user interaction |
1030
+ | `required` | `boolean` | `false` | Form validation required constraint |
1031
+ | `first-day-of-week` | `number` | `0` | Starting day of week: `0` for Sunday, `1` for Monday |
1032
+ | `show-actions` | `boolean` | `false` | Displays bottom action buttons (Cancel / OK) in docked mode |
1033
+ | `error` | `boolean` | `false` | Applies error visual styling |
1034
+ | `error-text` | `string` | `''` | Validation error message |
1035
+ | `supporting-text` | `string` | `''` | Helper text below the date picker |
1036
+ | `name` | `string` | `''` | HTML form input name (FACE) |
1037
+
1038
+ ##### Methods
1039
+ - `showModal()`: Opens the date picker as a modal dialog overlay.
1040
+ - `show()`: Opens the date picker.
1041
+ - `close()`: Closes the modal date picker.
1042
+ - `reset()`: Clears the selected date(s) and form association.
1043
+
1044
+ ##### Events
1045
+ - `change`: Dispatched when date selection is committed (`detail: { value, startDate?, endDate? }`).
1046
+ - `input`: Dispatched when date input value updates (`detail: { value }`).
1047
+ - `select`: Dispatched when an individual day is clicked (`detail: { date, type: 'single' | 'start' | 'end' }`).
1048
+ - `open`: Dispatched when modal dialog opens.
1049
+ - `close`: Dispatched when modal dialog closes.
1050
+ - `cancel`: Dispatched when modal dialog is canceled or backdrop is clicked.
1051
+
1052
+ ##### Code Example
1053
+ ```html
1054
+ <!-- Docked Single Date Picker -->
1055
+ <md-date-picker value="2026-08-22" label="Select date"></md-date-picker>
1056
+
1057
+ <!-- Date Range Picker -->
1058
+ <md-date-picker range value="2026-08-10/2026-08-20" label="Select range"></md-date-picker>
1059
+
1060
+ <!-- Min and Max Date Constraints -->
1061
+ <md-date-picker min="2026-08-05" max="2026-08-25" value="2026-08-15"></md-date-picker>
1062
+
1063
+ <!-- Modal Date Picker with Trigger Button -->
1064
+ <md-button variant="filled" icon="calendar_month" onclick="document.getElementById('booking-datepicker').showModal()">
1065
+ Select Date
1066
+ </md-button>
1067
+ <md-date-picker id="booking-datepicker" variant="modal" value="2026-08-22"></md-date-picker>
1068
+ ```
1069
+
1070
+ ---
1071
+
1072
+ ### Surfaces & Containment
1073
+
1074
+ #### Card (`md-card`)
1075
+
1076
+ - **Subpath**: `@francofantomius/material-components/card`
1077
+ - **Description**: Cards contain content and actions about a single subject, available in elevated, filled, and outlined styles with optional ripple interactivity.
1078
+
1079
+ ##### Properties & Attributes
1080
+ | Name | Type | Default | Description |
1081
+ | :--- | :--- | :--- | :--- |
1082
+ | `variant` | `'elevated' \| 'filled' \| 'outlined'` | `'elevated'` | Card visual style |
1083
+ | `interactive` | `boolean` | `false` | Enables hover elevation and ripple effect |
1084
+ | `disabled` | `boolean` | `false` | Disables card interactions |
1085
+ | `href` | `string` | `''` | Renders card as anchor link |
1086
+ | `target` | `string` | `''` | Anchor target when href is provided |
1087
+
1088
+ ##### Slots
1089
+ - `header`: Top card header content.
1090
+ - `actions`: Bottom actions button container.
1091
+ - `(default)`: Main card body content.
1092
+
1093
+ ##### Code Example
1094
+ ```html
1095
+ <md-card variant="outlined" style="max-width: 340px;">
1096
+ <div slot="header">
1097
+ <h3 style="margin: 0; font-size: 18px;">Outlined Card</h3>
1098
+ </div>
1099
+ Explore our Material Design 3 component library with built-in interactive feedback.
1100
+ <div slot="actions">
1101
+ <md-button variant="text">Dismiss</md-button>
1102
+ <md-button variant="filled">Learn More</md-button>
1103
+ </div>
1104
+ </md-card>
1105
+ ```
1106
+
1107
+ ---
1108
+
1109
+ #### Dialog (`md-dialog`)
1110
+
1111
+ - **Subpath**: `@francofantomius/material-components/dialog`
1112
+ - **Description**: Dialogs inform users about a task and can contain critical information, require decisions, or involve multiple tasks.
1113
+
1114
+ ##### Properties & Attributes
1115
+ | Name | Type | Default | Description |
1116
+ | :--- | :--- | :--- | :--- |
1117
+ | `open` | `boolean` | `false` | Reflects open/closed state of modal |
1118
+ | `headline` | `string` | `''` | Header title text |
1119
+ | `icon` | `string` | `''` | Material Symbols header icon |
1120
+
1121
+ ##### Slots
1122
+ - `actions`: Modal action buttons (Cancel, Confirm).
1123
+ - `(default)`: Dialog message body content.
1124
+
1125
+ ##### Events
1126
+ - `open`: Dispatched when dialog modal opens.
1127
+ - `close`: Dispatched when dialog closes (`detail: { returnValue?: string }`).
1128
+ - `cancel`: Dispatched when dialog is dismissed via Escape key.
1129
+
1130
+ ##### Code Example
1131
+ ```html
1132
+ <md-button variant="filled" id="open-dialog-btn">Open Dialog</md-button>
1133
+
1134
+ <md-dialog id="demo-dialog" headline="Discard Draft?" icon="warning">
1135
+ Are you sure you want to discard your changes? This action cannot be undone.
1136
+ <div slot="actions">
1137
+ <md-button variant="text" id="cancel-btn">Cancel</md-button>
1138
+ <md-button variant="filled" id="confirm-btn">Discard</md-button>
1139
+ </div>
1140
+ </md-dialog>
1141
+ ```
1142
+
1143
+ ---
1144
+
1145
+ #### Divider (`md-divider`)
1146
+
1147
+ - **Subpath**: `@francofantomius/material-components/divider`
1148
+ - **Description**: A divider is a thin line that groups content in lists and page layouts, supporting inset and vertical orientations.
1149
+
1150
+ ##### Properties & Attributes
1151
+ | Name | Type | Default | Description |
1152
+ | :--- | :--- | :--- | :--- |
1153
+ | `vertical` | `boolean` | `false` | Renders a vertical divider |
1154
+ | `inset` | `boolean` | `false` | Adds 16px start and end margins |
1155
+ | `inset-start` | `boolean` | `false` | Adds 16px margin only to the start |
1156
+ | `inset-end` | `boolean` | `false` | Adds 16px margin only to the end |
1157
+
1158
+ ##### Code Example
1159
+ ```html
1160
+ <div>Section Item Alpha</div>
1161
+ <md-divider></md-divider>
1162
+ <div>Section Item Beta</div>
1163
+ <md-divider inset></md-divider>
1164
+ <div>Section Item Gamma</div>
1165
+ ```
1166
+
1167
+ ---
1168
+
1169
+ #### Menu (`md-menu`, `md-menu-item`)
1170
+
1171
+ - **Subpath**: `@francofantomius/material-components/menu`
1172
+ - **Description**: Menus display a list of choices on temporary surfaces when users interact with a trigger or contextual control, supporting anchoring, keyboard navigation, supporting text, and selection events.
1173
+
1174
+ ##### `<md-menu>` Properties & Attributes
1175
+ | Name | Type | Default | Description |
1176
+ | :--- | :--- | :--- | :--- |
1177
+ | `open` | `boolean` | `false` | Reflects open/closed visibility state |
1178
+ | `anchor` | `string \| HTMLElement \| null` | `null` | Anchor element ID or HTMLElement reference |
1179
+ | `positioning` | `'absolute' \| 'fixed'` | `'absolute'` | Positioning strategy relative to trigger or viewport |
1180
+ | `placement` | `'bottom-start' \| 'bottom-end' \| 'top-start' \| 'top-end'` | `'bottom-start'` | Anchor edge placement for the menu surface |
1181
+ | `alignment` | `'start' \| 'end' \| 'center'` | `'start'` | Alignment of the menu relative to the anchor |
1182
+ | `x-offset` | `number` | `0` | Horizontal pixel offset from the anchor |
1183
+ | `y-offset` | `number` | `4` | Vertical pixel offset from the anchor |
1184
+ | `quick` | `boolean` | `false` | Disables open/close transition animations |
1185
+ | `dense` | `boolean` | `false` | Applies compact vertical spacing and smaller icon sizing |
1186
+ | `stay-open-on-focusout` | `boolean` | `false` | Prevents menu from closing when focus leaves the surface |
1187
+
1188
+ ##### `<md-menu-item>` Properties & Attributes
1189
+ | Name | Type | Default | Description |
1190
+ | :--- | :--- | :--- | :--- |
1191
+ | `headline` | `string` | `''` | Main item label text |
1192
+ | `supporting-text` | `string` | `''` | Secondary helper text below headline |
1193
+ | `trailing-supporting-text` | `string` | `''` | Trailing text (e.g. keyboard shortcut) |
1194
+ | `icon` | `string` | `''` | Leading Material Symbols icon name |
1195
+ | `trailing-icon` | `string` | `''` | Trailing Material Symbols icon name |
1196
+ | `disabled` | `boolean` | `false` | Disables interaction and dims item |
1197
+ | `selected` | `boolean` | `false` | Displays active selection state with checkmark |
1198
+ | `value` | `string` | `''` | Value associated with the menu item |
1199
+ | `href` | `string` | `''` | Renders item as an anchor link |
1200
+ | `target` | `string` | `''` | Anchor target attribute (e.g., `_blank`) |
1201
+ | `keep-open` | `boolean` | `false` | Prevents menu from closing when item is selected |
1202
+ | `dense` | `boolean` | `false` | Applies compact vertical sizing |
1203
+
1204
+ ##### Slots (`md-menu`)
1205
+ - `trigger`: Slotted trigger element (e.g., button or icon-button).
1206
+ - `(default)`: Menu items (`md-menu-item`) and dividers.
1207
+
1208
+ ##### Slots (`md-menu-item`)
1209
+ - `start` / `icon`: Leading icon or custom graphic.
1210
+ - `(default)`: Headline / label text.
1211
+ - `end` / `trailing`: Trailing content, shortcut text, or custom indicator.
1212
+
1213
+ ##### Events
1214
+ - `open`: Dispatched on `md-menu` when the menu opens.
1215
+ - `close`: Dispatched on `md-menu` when the menu closes.
1216
+ - `select`: Dispatched on `md-menu` and `md-menu-item` when an item is selected (`detail: { item: MdMenuItem, value: string }`).
1217
+
1218
+ ##### Code Example
1219
+ ```html
1220
+ <!-- Basic Action Menu with Trigger Button -->
1221
+ <md-menu>
1222
+ <md-button slot="trigger" variant="filled" icon="menu">Options</md-button>
1223
+ <md-menu-item icon="content_cut" headline="Cut" trailing-supporting-text="Ctrl+X" value="cut"></md-menu-item>
1224
+ <md-menu-item icon="content_copy" headline="Copy" trailing-supporting-text="Ctrl+C" value="copy"></md-menu-item>
1225
+ <md-menu-item icon="content_paste" headline="Paste" trailing-supporting-text="Ctrl+V" value="paste"></md-menu-item>
1226
+ <md-divider></md-divider>
1227
+ <md-menu-item icon="delete" headline="Delete" trailing-supporting-text="Del" value="delete"></md-menu-item>
1228
+ </md-menu>
1229
+
1230
+ <!-- Menu Anchored to External Trigger with Supporting Text -->
1231
+ <md-icon-button id="context-btn" icon="more_vert" aria-label="More options"></md-icon-button>
1232
+ <md-menu anchor="context-btn">
1233
+ <md-menu-item headline="Single view" supporting-text="Standard layout" selected value="single"></md-menu-item>
1234
+ <md-menu-item headline="Grid view" supporting-text="Compact card layout" value="grid"></md-menu-item>
1235
+ <md-menu-item headline="Table view" supporting-text="Detailed table row layout" disabled value="table"></md-menu-item>
1236
+ </md-menu>
1237
+ ```
1238
+
1239
+ ---
1240
+
1241
+ #### List & List Item (`md-list`, `md-list-item`)
1242
+
1243
+ - **Subpath**: `@francofantomius/material-components/list`
1244
+ - **Description**: Lists are continuous, vertical indexes of text and images, supporting 1-line, 2-line, and 3-line items with icons, avatars, and trailing text.
1245
+
1246
+ ##### `<md-list-item>` Properties
1247
+ | Name | Type | Default | Description |
1248
+ | :--- | :--- | :--- | :--- |
1249
+ | `headline` | `string` | `''` | Primary headline text |
1250
+ | `supporting-text` | `string` | `''` | Secondary supporting text description |
1251
+ | `trailing-supporting-text` | `string` | `''` | Metadata timestamp or trailing text |
1252
+ | `interactive` | `boolean` | `false` | Enables ripple hover and click response |
1253
+ | `disabled` | `boolean` | `false` | Disables item |
1254
+ | `href` | `string` | `''` | Renders item as hyperlink |
1255
+
1256
+ ##### `<md-list-item>` Slots
1257
+ - `start`: Leading icon, checkbox, or avatar.
1258
+ - `end`: Trailing icon, button, or switch.
1259
+
1260
+ ##### Code Example
1261
+ ```html
1262
+ <md-list style="max-width: 400px; background: var(--md-sys-color-surface-container-low); border-radius: 12px;">
1263
+ <md-list-item headline="Sarah Connor" supporting-text="Uploaded project roadmap" trailing-supporting-text="10:30 AM" interactive>
1264
+ <md-icon slot="start" name="account_circle" size="32"></md-icon>
1265
+ </md-list-item>
1266
+ <md-divider inset></md-divider>
1267
+ <md-list-item headline="Security Update" supporting-text="All packages upgraded to v2.0" trailing-supporting-text="Yesterday" interactive>
1268
+ <md-icon slot="start" name="shield" size="32"></md-icon>
1269
+ </md-list-item>
1270
+ </md-list>
1271
+ ```
1272
+
1273
+ ---
1274
+
1275
+ #### Table & Data Table (`md-table`)
1276
+
1277
+ - **Subpath**: `@francofantomius/material-components/table`
1278
+ - **Description**: Data tables display information in a structured grid of rows and columns, featuring automatic sorting, pagination, zebra striping, loading states, and multi-row selection.
1279
+
1280
+ ##### Properties & Attributes
1281
+ | Name | Type | Default | Description |
1282
+ | :--- | :--- | :--- | :--- |
1283
+ | `bordered` | `boolean` | `false` | Adds outer container and cell grid borders |
1284
+ | `elevated` | `boolean` | `false` | Applies Material elevation shadow |
1285
+ | `striped` | `boolean` | `false` | Zebra stripes alternating rows |
1286
+ | `hoverable` | `boolean` | `true` | Highlights rows on mouse hover |
1287
+ | `dense` | `boolean` | `false` | Compact cell and row padding |
1288
+ | `sticky-header` | `boolean` | `false` | Pins table header during scroll |
1289
+ | `loading` | `boolean` | `false` | Displays indeterminate top progress bar |
1290
+ | `selectable` | `boolean` | `false` | Enables row selection checkboxes |
1291
+ | `columns` | `TableColumn[]` | `[]` | Data-driven column configuration array |
1292
+ | `rows` | `Record<string, any>[]` | `[]` | Data-driven row data array |
1293
+ | `paginated` | `boolean` | `false` | Renders built-in pagination footer |
1294
+ | `page` | `number` | `1` | Active page index (1-based) |
1295
+ | `page-size` | `number` | `10` | Items per page |
1296
+ | `total` | `number` | `0` | Total row count |
1297
+
1298
+ ##### Events
1299
+ - `sort-change`: Fired when column sorting is toggled (`detail: { column: string, direction: "asc" | "desc" | "none" }`).
1300
+ - `row-click`: Fired when a row is clicked (`detail: { row: any, index: number }`).
1301
+ - `selection-change`: Fired when row selection changes (`detail: { selectedRows: any[] }`).
1302
+ - `page-change`: Fired when page changes (`detail: { page: number, pageSize: number }`).
1303
+
1304
+ ##### Code Example
1305
+ ```html
1306
+ <md-table
1307
+ id="demo-table"
1308
+ bordered
1309
+ striped
1310
+ hoverable
1311
+ elevated
1312
+ selectable
1313
+ paginated
1314
+ page-size="5"
1315
+ style="width: 100%;"
1316
+ ></md-table>
1317
+
1318
+ <script>
1319
+ const table = document.getElementById('demo-table');
1320
+ table.columns = [
1321
+ { key: 'name', label: 'Name', sortable: true },
1322
+ { key: 'role', label: 'Role', sortable: true },
1323
+ { key: 'status', label: 'Status' }
1324
+ ];
1325
+ table.rows = [
1326
+ { name: 'Alice Smith', role: 'Architect', status: 'Active' },
1327
+ { name: 'Bob Jones', role: 'Developer', status: 'Away' }
1328
+ ];
1329
+ </script>
1330
+ ```
1331
+
1332
+ ---
1333
+
1334
+ #### Side Sheet (`md-side-sheet`)
1335
+
1336
+ - **Subpath**: `@francofantomius/material-components/side-sheet`
1337
+ - **Description**: Side sheets display secondary content anchored to the side of the screen, supporting standard in-flow side panels and modal overlays with backdrop scrims.
1338
+
1339
+ ##### Properties & Attributes
1340
+ | Name | Type | Default | Description |
1341
+ | :--- | :--- | :--- | :--- |
1342
+ | `open` | `boolean` | `false` | Reflects open/closed state of the side sheet |
1343
+ | `type` | `'standard' \| 'modal'` | `'standard'` | Presentation mode: in-flow side panel or modal overlay |
1344
+ | `modal` | `boolean` | `false` | Enables modal overlay mode with backdrop scrim |
1345
+ | `side` | `'start' \| 'end' \| 'left' \| 'right'` | `'end'` | Screen side placement (start / left or end / right) |
1346
+ | `headline` | `string` | `''` | Header title text |
1347
+ | `subhead` | `string` | `''` | Header subtitle text |
1348
+ | `hide-close-button` | `boolean` | `false` | Hides the default close icon button in the header |
1349
+ | `divider` | `boolean` | `false` | Renders a divider line below the header |
1350
+
1351
+ ##### Slots
1352
+ - `header`: Full custom header area.
1353
+ - `headline`: Custom headline / title content.
1354
+ - `subhead`: Custom subtitle / subhead content.
1355
+ - `header-actions`: Actions next to the close button in the header.
1356
+ - `close-button`: Custom close button element.
1357
+ - `(default)`: Main scrollable body content.
1358
+ - `footer`: Bottom footer / actions section.
1359
+ - `actions`: Action buttons inside the footer.
1360
+
1361
+ ##### Events
1362
+ - `open`: Dispatched when the side sheet opens.
1363
+ - `close`: Dispatched when the side sheet closes.
1364
+ - `cancel`: Dispatched when dismissed via Escape key in modal mode.
1365
+ - `scrim-click`: Dispatched when the modal scrim backdrop is clicked.
1366
+ - `close-click`: Dispatched when the header close button is clicked.
1367
+
1368
+ ##### Code Example
1369
+ ```html
1370
+ <!-- Modal Side Sheet -->
1371
+ <md-button variant="filled" id="open-sheet-btn">Open Filters</md-button>
1372
+
1373
+ <md-side-sheet id="filters-sheet" type="modal" headline="Filters" subhead="Refine product listing">
1374
+ <md-checkbox checked>In Stock</md-checkbox>
1375
+ <md-checkbox>Free Shipping</md-checkbox>
1376
+ <div slot="actions">
1377
+ <md-button variant="text">Reset</md-button>
1378
+ <md-button variant="filled">Apply</md-button>
1379
+ </div>
1380
+ </md-side-sheet>
1381
+
1382
+ <!-- Standard In-Flow Side Sheet -->
1383
+ <div style="display: flex; height: 400px;">
1384
+ <div style="flex: 1; padding: 16px;">Main Page Content</div>
1385
+ <md-side-sheet open headline="Details" divider>
1386
+ <p>Contextual tool details and metadata.</p>
1387
+ </md-side-sheet>
1388
+ </div>
1389
+ ```
1390
+
1391
+ ---
1392
+
1393
+ #### Bottom Sheet (`md-bottom-sheet`)
1394
+
1395
+ - **Subpath**: `@francofantomius/material-components/bottom-sheet`
1396
+ - **Description**: Bottom sheets display supplementary content anchored to the bottom of the screen, supporting standard (docked) and modal (overlay with backdrop scrim) modes, drag handle gestures, touch swipe-to-dismiss, and customizable headers and footers.
1397
+
1398
+ ##### Properties & Attributes
1399
+ | Name | Type | Default | Description |
1400
+ | :--- | :--- | :--- | :--- |
1401
+ | `open` | `boolean` | `false` | Reflects open/closed state of the bottom sheet |
1402
+ | `type` | `'standard' \| 'modal'` | `'standard'` | Presentation mode: standard in-flow panel or modal overlay |
1403
+ | `modal` | `boolean` | `false` | Enables modal overlay mode with backdrop scrim |
1404
+ | `headline` | `string` | `''` | Header title text |
1405
+ | `subhead` | `string` | `''` | Header subtitle text |
1406
+ | `hide-drag-handle` | `boolean` | `false` | Hides the top drag handle bar |
1407
+ | `hide-close-button` | `boolean` | `false` | Hides the default close icon button in the header |
1408
+ | `divider` | `boolean` | `false` | Renders a divider line below the header |
1409
+ | `fullscreen` | `boolean` | `false` | Expands bottom sheet to full viewport height |
1410
+
1411
+ ##### Slots
1412
+ - `drag-handle`: Custom drag handle element.
1413
+ - `header`: Full custom header area.
1414
+ - `headline`: Custom headline / title content.
1415
+ - `subhead`: Custom subtitle / subhead content.
1416
+ - `header-actions`: Actions next to the close button in the header.
1417
+ - `close-button`: Custom close button element.
1418
+ - `(default)`: Main scrollable body content.
1419
+ - `footer`: Bottom footer / actions section.
1420
+ - `actions`: Action buttons inside the footer.
1421
+
1422
+ ##### Events
1423
+ - `open`: Dispatched when the bottom sheet opens.
1424
+ - `close`: Dispatched when the bottom sheet closes.
1425
+ - `cancel`: Dispatched when dismissed via Escape key in modal mode.
1426
+ - `scrim-click`: Dispatched when the modal scrim backdrop is clicked.
1427
+ - `close-click`: Dispatched when the header close button is clicked.
1428
+ - `drag-start`: Dispatched when drag gesture begins.
1429
+ - `drag-end`: Dispatched when drag gesture ends.
1430
+ - `drag-dismiss`: Dispatched when dismissed via downward drag gesture.
1431
+
1432
+ ##### Code Example
1433
+ ```html
1434
+ <!-- Modal Bottom Sheet with Drag Dismissal -->
1435
+ <md-button variant="filled" id="open-sheet-btn">Open Bottom Sheet</md-button>
1436
+
1437
+ <md-bottom-sheet id="demo-bottom-sheet" type="modal" headline="Share" subhead="Select a sharing option">
1438
+ <div style="display: flex; gap: 16px; padding: 12px 0;">
1439
+ <md-icon-button icon="link" aria-label="Copy link"></md-icon-button>
1440
+ <md-icon-button icon="mail" aria-label="Email"></md-icon-button>
1441
+ <md-icon-button icon="chat" aria-label="Messages"></md-icon-button>
1442
+ </div>
1443
+ <div slot="actions">
1444
+ <md-button variant="text">Cancel</md-button>
1445
+ </div>
1446
+ </md-bottom-sheet>
1447
+
1448
+ <!-- Standard Docked Bottom Sheet -->
1449
+ <md-bottom-sheet open headline="Now Playing" subhead="Song queue" divider>
1450
+ <p>Track 1: Ambient Horizon (3:42)</p>
1451
+ </md-bottom-sheet>
1452
+ ```
1453
+
1454
+ ---
1455
+
1456
+ #### Carousel (`md-carousel`, `md-carousel-item`)
1457
+
1458
+ - **Subpath**: `@francofantomius/material-components/carousel`
1459
+ - **Description**: Carousels present an interactive scrollable collection of items with support for multi-browse, hero, and full-width layouts, smooth scrolling, next/prev navigation buttons, swipe/drag gestures, and pagination indicators.
1460
+
1461
+ ##### Properties & Attributes (`<md-carousel>`)
1462
+ | Name | Type | Default | Description |
1463
+ | :--- | :--- | :--- | :--- |
1464
+ | `layout` | `'multi-browse' \| 'hero' \| 'full-width' \| 'uncontained'` | `'multi-browse'` | Layout arrangement and sizing for carousel items |
1465
+ | `active-index` | `number` | `0` | 0-based index of the currently active item |
1466
+ | `hide-controls` | `boolean` | `false` | Hides next and previous navigation arrow buttons |
1467
+ | `hide-indicators` | `boolean` | `false` | Hides bottom pagination indicator dots |
1468
+ | `loop` | `boolean` | `false` | Enables continuous infinite wrap-around navigation |
1469
+ | `autoplay` | `boolean` | `false` | Automatically advances slides periodically |
1470
+ | `autoplay-interval` | `number` | `5000` | Autoplay transition interval in milliseconds |
1471
+ | `item-spacing` | `string \| number` | `'8px'` | Gap between carousel items |
1472
+ | `item-width` | `string` | `''` | Custom width applied to each item |
1473
+ | `item-height` | `string` | `''` | Custom height applied to each item |
1474
+
1475
+ ##### Properties & Attributes (`<md-carousel-item>`)
1476
+ | Name | Type | Default | Description |
1477
+ | :--- | :--- | :--- | :--- |
1478
+ | `src` | `string` | `''` | Image source URL for the carousel item media |
1479
+ | `alt` | `string` | `''` | Alt text for image media |
1480
+ | `headline` | `string` | `''` | Title or headline overlay text |
1481
+ | `subhead` | `string` | `''` | Subtitle or description overlay text |
1482
+ | `href` | `string` | `''` | Optional navigation link URL |
1483
+ | `target` | `string` | `''` | Link target when href is set |
1484
+ | `interactive` | `boolean` | `false` | Enables ripple and hover interactive state |
1485
+ | `disabled` | `boolean` | `false` | Disables item interactions |
1486
+ | `snap-align` | `'start' \| 'center' \| 'end'` | `'start'` | Scroll snap alignment point |
1487
+
1488
+ ##### Methods (`<md-carousel>`)
1489
+ - `next()`: Scrolls to the next slide in the carousel.
1490
+ - `previous()`: Scrolls to the previous slide in the carousel.
1491
+ - `scrollToIndex(index: number, smooth: boolean = true)`: Smoothly scrolls to a specific item index.
1492
+
1493
+ ##### Events
1494
+ - `change`: Fired when the active slide changes (`detail: { activeIndex: number, item: MdCarouselItem }`).
1495
+ - `carousel-item-click`: Fired when an item is clicked (`detail: { item: MdCarouselItem }`).
1496
+
1497
+ ##### Slots (`<md-carousel>`)
1498
+ - `(default)`: Slot for `<md-carousel-item>` elements.
1499
+ - `prev-button`: Custom previous navigation button.
1500
+ - `next-button`: Custom next navigation button.
1501
+
1502
+ ##### Slots (`<md-carousel-item>`)
1503
+ - `(default)`: Custom card/slide body content.
1504
+ - `media`: Custom media element (image, video).
1505
+ - `headline`: Custom headline text element.
1506
+ - `subhead`: Custom subhead text element.
1507
+
1508
+ ##### Code Examples
1509
+
1510
+ ```html
1511
+ <!-- Multi-Browse Layout (Default) -->
1512
+ <md-carousel>
1513
+ <md-carousel-item
1514
+ src="https://images.unsplash.com/photo-1579546929518-9e396f3cc809?w=600&auto=format&fit=crop&q=80"
1515
+ headline="Colorful Gradients"
1516
+ subhead="Modern vibrant colors"
1517
+ ></md-carousel-item>
1518
+ <md-carousel-item
1519
+ src="https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=600&auto=format&fit=crop&q=80"
1520
+ headline="Abstract Waves"
1521
+ subhead="Smooth fluid motion"
1522
+ ></md-carousel-item>
1523
+ <md-carousel-item
1524
+ src="https://images.unsplash.com/photo-1550684848-fac1c5b4e853?w=600&auto=format&fit=crop&q=80"
1525
+ headline="Dark Aesthetics"
1526
+ subhead="Geometric lighting"
1527
+ ></md-carousel-item>
1528
+ </md-carousel>
1529
+
1530
+ <!-- Hero Layout with Loop -->
1531
+ <md-carousel layout="hero" loop>
1532
+ <md-carousel-item
1533
+ src="https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=800&auto=format&fit=crop&q=80"
1534
+ headline="Mountain Exploration"
1535
+ subhead="Scenic landscapes and trails"
1536
+ ></md-carousel-item>
1537
+ <md-carousel-item
1538
+ src="https://images.unsplash.com/photo-1447752875215-b2761acb3c5d?w=800&auto=format&fit=crop&q=80"
1539
+ headline="Forest Pathways"
1540
+ subhead="Lush greenery and walks"
1541
+ ></md-carousel-item>
1542
+ </md-carousel>
1543
+
1544
+ <!-- Full-Width Layout with Autoplay -->
1545
+ <md-carousel layout="full-width" autoplay autoplay-interval="4000">
1546
+ <md-carousel-item
1547
+ src="https://images.unsplash.com/photo-1518770660439-4636190af475?w=1000&auto=format&fit=crop&q=80"
1548
+ headline="Circuit Technology"
1549
+ subhead="Microchip architecture"
1550
+ ></md-carousel-item>
1551
+ <md-carousel-item
1552
+ src="https://images.unsplash.com/photo-1526374965328-7f61d4dc18c5?w=1000&auto=format&fit=crop&q=80"
1553
+ headline="Data Matrix"
1554
+ subhead="Cybersecurity networks"
1555
+ ></md-carousel-item>
1556
+ </md-carousel>
1557
+ ```
1558
+
1559
+ ---
1560
+
1561
+ ### Communication & Feedback
1562
+
1563
+ #### Badge (`md-badge`)
1564
+
1565
+ - **Subpath**: `@francofantomius/material-components/badge`
1566
+ - **Description**: Badges show notification counts, alert statuses, or small indicators anchored to icon buttons or list elements.
1567
+
1568
+ ##### Properties & Attributes
1569
+ | Name | Type | Default | Description |
1570
+ | :--- | :--- | :--- | :--- |
1571
+ | `value` | `string` | `''` | Badge numeric or text value |
1572
+ | `dot` | `boolean` | `false` | Renders a small 6px dot without text |
1573
+
1574
+ ##### Code Example
1575
+ ```html
1576
+ <div style="display: flex; gap: 24px; align-items: center;">
1577
+ <md-badge value="4">
1578
+ <md-icon-button icon="mail" aria-label="Mail"></md-icon-button>
1579
+ </md-badge>
1580
+ <md-badge value="99+">
1581
+ <md-icon-button icon="notifications" aria-label="Notifications"></md-icon-button>
1582
+ </md-badge>
1583
+ <md-badge dot>
1584
+ <md-icon-button icon="chat" aria-label="Messages"></md-icon-button>
1585
+ </md-badge>
1586
+ </div>
1587
+ ```
1588
+
1589
+ ---
1590
+
1591
+ #### Progress Indicators (`md-progress`)
1592
+
1593
+ - **Subpath**: `@francofantomius/material-components/progress`
1594
+ - **Description**: Progress indicators express an unspecified wait time or display the length of a process in linear and circular formats, featuring Material 3 wavy lines for determinate values.
1595
+
1596
+ ##### Properties & Attributes
1597
+ | Name | Type | Default | Description |
1598
+ | :--- | :--- | :--- | :--- |
1599
+ | `type` | `'linear' \| 'circular'` | `'linear'` | Indicator shape |
1600
+ | `value` | `number \| null` | `null` | Determinate value between 0 and 1. `null` indicates indeterminate. |
1601
+ | `max` | `number` | `1` | Maximum progress value |
1602
+ | `buffer` | `number` | `1` | Buffer value for linear progress indicator |
1603
+ | `wavy` | `boolean` | `true` | Enables Material 3 wavy line for determinate values |
1604
+
1605
+ ##### Code Example
1606
+ ```html
1607
+ <!-- Linear Progress with Wavy Line -->
1608
+ <md-progress type="linear" value="0.7"></md-progress>
1609
+ <md-progress type="linear"></md-progress>
1610
+
1611
+ <!-- Circular Progress with Wavy Line -->
1612
+ <md-progress type="circular" value="0.65"></md-progress>
1613
+ <md-progress type="circular"></md-progress>
1614
+ ```
1615
+
1616
+ ---
1617
+
1618
+ #### Loading Indicator (`md-loading-indicator`)
1619
+
1620
+ - **Subpath**: `@francofantomius/material-components/loading-indicator`
1621
+ - **Description**: Loading indicators express an unspecified wait time for short operations with Material Design 3 Expressive animated morphing shapes and optional contained containers.
1622
+
1623
+ ##### Properties & Attributes
1624
+ | Name | Type | Default | Description |
1625
+ | :--- | :--- | :--- | :--- |
1626
+ | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Visual size of the indicator |
1627
+ | `contained` | `boolean` | `false` | Encloses indicator within a contained surface container |
1628
+ | `shape` | `'morph' \| 'square' \| 'circle' \| 'clover' \| 'star'` | `'morph'` | Shape animation style |
1629
+ | `paused` | `boolean` | `false` | Pauses shape animation |
1630
+ | `label` | `string` | `'Loading'` | Accessible label for screen readers |
1631
+
1632
+ ##### Code Example
1633
+ ```html
1634
+ <!-- Standard morphing loading indicators -->
1635
+ <div style="display: flex; gap: 24px; align-items: center;">
1636
+ <md-loading-indicator size="small"></md-loading-indicator>
1637
+ <md-loading-indicator size="medium"></md-loading-indicator>
1638
+ <md-loading-indicator size="large"></md-loading-indicator>
1639
+ </div>
1640
+
1641
+ <!-- Contained loading indicators -->
1642
+ <div style="display: flex; gap: 24px; align-items: center; margin-top: 16px;">
1643
+ <md-loading-indicator contained size="small"></md-loading-indicator>
1644
+ <md-loading-indicator contained size="medium"></md-loading-indicator>
1645
+ <md-loading-indicator contained size="large"></md-loading-indicator>
1646
+ </div>
1647
+ ```
1648
+
1649
+ ---
1650
+
1651
+ #### Snackbar (`md-snackbar`)
1652
+
1653
+ - **Subpath**: `@francofantomius/material-components/snackbar`
1654
+ - **Description**: Snackbars provide brief feedback about an operation through an elevated message toast at the bottom of the viewport.
1655
+
1656
+ ##### Properties & Attributes
1657
+ | Name | Type | Default | Description |
1658
+ | :--- | :--- | :--- | :--- |
1659
+ | `open` | `boolean` | `false` | Visibility state |
1660
+ | `message` | `string` | `''` | Message toast content |
1661
+ | `action-text` | `string` | `''` | Action button label |
1662
+ | `closeable` | `boolean` | `false` | Renders a close icon button |
1663
+ | `timeout-ms` | `number` | `4000` | Auto-dismiss timeout in milliseconds (0 for indefinite) |
1664
+
1665
+ ##### Events
1666
+ - `open`: Fired when snackbar appears.
1667
+ - `close`: Fired when snackbar dismisses.
1668
+ - `action`: Fired when user clicks action button.
1669
+
1670
+ ##### Code Example
1671
+ ```html
1672
+ <md-button variant="tonal" id="show-toast-btn">Show Snackbar</md-button>
1673
+ <md-snackbar id="demo-toast" message="Email message moved to Trash." action-text="Undo" closeable></md-snackbar>
1674
+
1675
+ <script>
1676
+ document.getElementById('show-toast-btn').addEventListener('click', () => {
1677
+ document.getElementById('demo-toast').open = true;
1678
+ });
1679
+ </script>
1680
+ ```
1681
+
1682
+ ---
1683
+
1684
+ #### Tooltip (`md-tooltip`)
1685
+
1686
+ - **Subpath**: `@francofantomius/material-components/tooltip`
1687
+ - **Description**: Tooltips display informative text when users hover over, focus on, or tap an element. Plain tooltips describe an element briefly, while rich tooltips provide detailed context, headlines, and action buttons.
1688
+
1689
+ ##### Properties & Attributes
1690
+ | Name | Type | Default | Description |
1691
+ | :--- | :--- | :--- | :--- |
1692
+ | `open` | `boolean` | `false` | Visibility state of the tooltip |
1693
+ | `position` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'bottom'` | Preferred placement relative to anchor target |
1694
+ | `rich` | `boolean` | `false` | Enables rich tooltip styling with headline, supporting text, and actions |
1695
+ | `for` | `string` | `''` | ID of the target anchor element |
1696
+ | `value` | `string` | `''` | Plain tooltip label or rich tooltip supporting text |
1697
+ | `headline` | `string` | `''` | Headline / subhead for rich tooltips |
1698
+ | `action-text` | `string` | `''` | Action button label for rich tooltips |
1699
+ | `show-delay` | `number` | `500` | Delay in milliseconds before showing tooltip on hover |
1700
+ | `hide-delay` | `number` | `150` | Delay in milliseconds before hiding tooltip after pointer leaves |
1701
+ | `persistent` | `boolean` | `false` | Keeps rich tooltip open until dismissed explicitly |
1702
+ | `has-caret` | `boolean` | `false` | Renders a directional pointing caret |
1703
+ | `disabled` | `boolean` | `false` | Disables tooltip triggering |
1704
+
1705
+ ##### Events
1706
+ - `open`: Dispatched when tooltip becomes visible (`{ target: MdTooltip }`).
1707
+ - `close`: Dispatched when tooltip is dismissed (`{ target: MdTooltip }`).
1708
+ - `action`: Dispatched when rich tooltip action button is clicked (`{ target: MdTooltip }`).
1709
+
1710
+ ##### Slots
1711
+ - `(default)`: Plain tooltip text or rich tooltip supporting content.
1712
+ - `headline`: Custom headline or rich header element.
1713
+ - `actions`: Custom action buttons for rich tooltips.
1714
+ - `anchor`: Slotted anchor element (optional).
1715
+
1716
+ ##### Code Example
1717
+ ```html
1718
+ <!-- Plain Tooltips on Icon Buttons -->
1719
+ <div style="display: flex; gap: 24px; align-items: center;">
1720
+ <div>
1721
+ <md-icon-button id="fav-btn" icon="favorite" aria-label="Favorite"></md-icon-button>
1722
+ <md-tooltip for="fav-btn" value="Add to favorites" position="bottom"></md-tooltip>
1723
+ </div>
1724
+
1725
+ <div>
1726
+ <md-icon-button id="share-btn" icon="share" aria-label="Share"></md-icon-button>
1727
+ <md-tooltip for="share-btn" value="Share link" position="top"></md-tooltip>
1728
+ </div>
1729
+ </div>
1730
+
1731
+ <!-- Rich Tooltip with Headline and Action -->
1732
+ <div>
1733
+ <md-button id="help-btn" variant="tonal" icon="help_outline">Permissions</md-button>
1734
+ <md-tooltip
1735
+ for="help-btn"
1736
+ rich
1737
+ has-caret
1738
+ position="bottom"
1739
+ headline="Access Permissions"
1740
+ value="Members with View permissions can read and comment on documents without editing."
1741
+ action-text="Learn more"
1742
+ ></md-tooltip>
1743
+ </div>
1744
+ ```
1745
+
1746
+ ---
1747
+
1748
+ ### Navigation
1749
+
1750
+ #### Navigation Bar (`md-navigation-bar`, `md-navigation-bar-item`)
1751
+
1752
+ - **Subpath**: `@francofantomius/material-components/navigation-bar`
1753
+ - **Description**: Navigation bars let users switch between 3 to 5 top-level destinations at the bottom of the screen with active indicator pills, badge notifications, and label visibility modes (`alwaysShow`, `selectedShow`, `hidden`).
1754
+
1755
+ ##### `<md-navigation-bar>` Properties
1756
+ | Name | Type | Default | Description |
1757
+ | :--- | :--- | :--- | :--- |
1758
+ | `active-index` | `number` | `0` | Zero-based index of the currently active destination |
1759
+ | `value` | `string` | `''` | Value of the currently active destination |
1760
+ | `label-mode` | `'alwaysShow' \| 'selectedShow' \| 'hidden'` | `'alwaysShow'` | Controls label visibility across destination items |
1761
+ | `hide-inactive-labels` | `boolean` | `false` | Hides labels on inactive items (`selectedShow` behavior) |
1762
+ | `disabled` | `boolean` | `false` | Disables interaction on all items |
1763
+
1764
+ ##### `<md-navigation-bar-item>` Properties
1765
+ | Name | Type | Default | Description |
1766
+ | :--- | :--- | :--- | :--- |
1767
+ | `icon` | `string` | `''` | Material Symbols destination icon |
1768
+ | `active-icon` | `string` | `''` | Optional icon displayed when item is active |
1769
+ | `label` | `string` | `''` | Destination title text |
1770
+ | `badge` | `string` | `''` | Numeric, text, or `"dot"` badge indicator |
1771
+ | `active` | `boolean` | `false` | Highlights item with active indicator pill |
1772
+ | `disabled` | `boolean` | `false` | Disables item interactions |
1773
+ | `value` | `string` | `''` | Value identifier for destination |
1774
+ | `href` | `string` | `''` | Optional navigation hyperlink |
1775
+ | `label-mode` | `'alwaysShow' \| 'selectedShow' \| 'hidden'` | `'alwaysShow'` | Per-item label visibility mode |
1776
+
1777
+ ##### Events
1778
+ - `change`: Dispatched on `<md-navigation-bar>` when the active destination changes (`{ activeIndex, selectedIndex, index, value, item }`).
1779
+ - `item-click`: Dispatched on `<md-navigation-bar-item>` when clicked (`{ item, value, label, active }`).
1780
+
1781
+ ##### Code Example
1782
+ ```html
1783
+ <md-navigation-bar active-index="0" id="bottom-nav">
1784
+ <md-navigation-bar-item icon="home" label="Home" value="home"></md-navigation-bar-item>
1785
+ <md-navigation-bar-item icon="explore" label="Explore" value="explore"></md-navigation-bar-item>
1786
+ <md-navigation-bar-item icon="mail" label="Mail" badge="12" value="mail"></md-navigation-bar-item>
1787
+ <md-navigation-bar-item icon="chat" label="Chat" badge="dot" value="chat"></md-navigation-bar-item>
1788
+ <md-navigation-bar-item icon="person" label="Profile" value="profile"></md-navigation-bar-item>
1789
+ </md-navigation-bar>
1790
+ ```
1791
+
1792
+ ---
1793
+
1794
+ #### Navigation Drawer (`md-navigation-drawer`, `md-navigation-drawer-item`)
1795
+
1796
+ - **Subpath**: `@francofantomius/material-components/navigation-drawer`
1797
+ - **Description**: Navigation drawers provide side navigation access to top-level destinations and app features in standard or modal configurations.
1798
+
1799
+ ##### `<md-navigation-drawer>` Properties
1800
+ | Name | Type | Default | Description |
1801
+ | :--- | :--- | :--- | :--- |
1802
+ | `open` | `boolean` | `false` | Reflects open/closed state |
1803
+ | `type` | `'modal' \| 'standard' \| 'responsive'` | `'modal'` | Drawer presentation mode |
1804
+ | `responsive` | `boolean` | `false` | Enables responsive mode (docked on desktop >960px, modal on mobile) |
1805
+ | `pivot` | `'left' \| 'right'` | `'left'` | Anchoring screen edge |
1806
+ | `headline` | `string` | `''` | Drawer title header |
1807
+
1808
+ ##### `<md-navigation-drawer-item>` Properties
1809
+ | Name | Type | Default | Description |
1810
+ | :--- | :--- | :--- | :--- |
1811
+ | `icon` | `string` | `''` | Material Symbols destination icon |
1812
+ | `label` | `string` | `''` | Destination title |
1813
+ | `badge` | `string` | `''` | Trailing counter or status badge |
1814
+ | `active` | `boolean` | `false` | Highlights item with active pill indicator |
1815
+ | `disabled` | `boolean` | `false` | Disables item |
1816
+ | `href` | `string` | `''` | Optional navigation link |
1817
+
1818
+ ##### Events
1819
+ - `open`: Dispatched when drawer opens.
1820
+ - `close`: Dispatched when drawer closes.
1821
+ - `item-click`: Dispatched when a drawer item is selected.
1822
+
1823
+ ##### Code Example
1824
+ ```html
1825
+ <md-navigation-drawer id="demo-drawer" headline="Mail Destinations">
1826
+ <md-navigation-drawer-item icon="inbox" label="Inbox" badge="12" active></md-navigation-drawer-item>
1827
+ <md-navigation-drawer-item icon="star" label="Starred"></md-navigation-drawer-item>
1828
+ <md-navigation-drawer-item icon="send" label="Sent"></md-navigation-drawer-item>
1829
+ <md-navigation-drawer-item icon="drafts" label="Drafts" badge="2"></md-navigation-drawer-item>
1830
+ <div slot="footer">
1831
+ <md-navigation-drawer-item icon="settings" label="Settings"></md-navigation-drawer-item>
1832
+ </div>
1833
+ </md-navigation-drawer>
1834
+ ```
1835
+
1836
+ ---
1837
+
1838
+ #### Navigation Rail (`md-navigation-rail`, `md-navigation-rail-item`)
1839
+
1840
+ - **Subpath**: `@francofantomius/material-components/navigation-rail`
1841
+ - **Description**: Navigation rails provide side navigation access to primary destinations in apps on mid-sized to large screens (tablets, desktops), supporting leading menu/header/fab slots, active indicator pill destinations, badges, and top/center/bottom alignment.
1842
+
1843
+ ##### `<md-navigation-rail>` Properties
1844
+ | Name | Type | Default | Description |
1845
+ | :--- | :--- | :--- | :--- |
1846
+ | `alignment` | `'top' \| 'center' \| 'bottom'` | `'top'` | Vertical alignment of destination items |
1847
+ | `hide-labels` | `boolean` | `false` | Hides all destination text labels |
1848
+ | `active-index` | `number` | `-1` | Zero-based index of the currently active destination |
1849
+
1850
+ ##### `<md-navigation-rail-item>` Properties
1851
+ | Name | Type | Default | Description |
1852
+ | :--- | :--- | :--- | :--- |
1853
+ | `icon` | `string` | `''` | Material Symbols destination icon |
1854
+ | `active-icon` | `string` | `''` | Material Symbols icon displayed when active |
1855
+ | `label` | `string` | `''` | Destination title |
1856
+ | `badge` | `string` | `''` | Numeric or text badge indicator |
1857
+ | `badge-dot` | `boolean` | `false` | Small circular status dot badge |
1858
+ | `active` | `boolean` | `false` | Highlights destination with active indicator pill |
1859
+ | `disabled` | `boolean` | `false` | Disables destination interaction |
1860
+ | `hide-label` | `boolean` | `false` | Hides text label for this item |
1861
+ | `href` | `string` | `''` | Optional navigation hyperlink |
1862
+ | `value` | `string` | `''` | Custom item value identifier |
1863
+
1864
+ ##### Slots
1865
+ - `header`: Top header section (logo, title).
1866
+ - `menu`: Top menu button slot.
1867
+ - `fab`: Slotted Floating Action Button (FAB).
1868
+ - `(default)`: Main destination items (`md-navigation-rail-item`).
1869
+ - `footer`: Bottom actions or user profile slot.
1870
+
1871
+ ##### Events
1872
+ - `change`: Dispatched when active destination in the rail changes (`detail: { activeIndex: number, item: MdNavigationRailItem, value: string }`).
1873
+ - `item-click`: Dispatched when an individual rail item is clicked (`detail: { label: string, icon: string, active: boolean, value: string, item: MdNavigationRailItem }`).
1874
+
1875
+ ##### Code Example
1876
+ ```html
1877
+ <md-navigation-rail alignment="top">
1878
+ <md-icon-button slot="menu" icon="menu" aria-label="Menu"></md-icon-button>
1879
+ <md-fab slot="fab" size="small" icon="edit" aria-label="Compose"></md-fab>
1880
+
1881
+ <md-navigation-rail-item icon="inbox" label="Inbox" badge="3" active></md-navigation-rail-item>
1882
+ <md-navigation-rail-item icon="star" label="Starred"></md-navigation-rail-item>
1883
+ <md-navigation-rail-item icon="send" label="Sent"></md-navigation-rail-item>
1884
+ <md-navigation-rail-item icon="chat" label="Chat" badge-dot></md-navigation-rail-item>
1885
+
1886
+ <div slot="footer">
1887
+ <md-icon-button icon="settings" aria-label="Settings"></md-icon-button>
1888
+ </div>
1889
+ </md-navigation-rail>
1890
+ ```
1891
+
1892
+ ---
1893
+
1894
+ #### Top App Bar (`md-top-app-bar`)
1895
+
1896
+ - **Subpath**: `@francofantomius/material-components/top-app-bar`
1897
+ - **Description**: Top app bars display branding, titles, navigation controls, and actions at the top of a screen across small, center-aligned, medium, and large variants.
1898
+
1899
+ ##### Properties & Attributes
1900
+ | Name | Type | Default | Description |
1901
+ | :--- | :--- | :--- | :--- |
1902
+ | `variant` | `'center-aligned' \| 'small' \| 'medium' \| 'large'` | `'center-aligned'` | Layout format of the top bar |
1903
+ | `headline` | `string` | `''` | Main title headline |
1904
+ | `subtitle` | `string` | `''` | Secondary supporting text |
1905
+ | `elevated` | `boolean` | `false` | Applies elevation shadow and surface container color |
1906
+ | `fixed` | `boolean` | `false` | Pins app bar to top of viewport (sticky) |
1907
+
1908
+ ##### Slots
1909
+ - `navigation`: Leading icon button (e.g. Hamburger menu or back arrow).
1910
+ - `actions`: Trailing action buttons and overflow menu triggers.
1911
+
1912
+ ##### Code Example
1913
+ ```html
1914
+ <md-top-app-bar variant="small" headline="Inbox" subtitle="3 unread messages">
1915
+ <md-icon-button slot="navigation" icon="menu" aria-label="Menu"></md-icon-button>
1916
+ <md-icon-button slot="actions" icon="search" aria-label="Search"></md-icon-button>
1917
+ <md-icon-button slot="actions" icon="more_vert" aria-label="More"></md-icon-button>
1918
+ </md-top-app-bar>
1919
+
1920
+ <md-top-app-bar variant="center-aligned" headline="Settings" elevated>
1921
+ <md-icon-button slot="navigation" icon="arrow_back" aria-label="Back"></md-icon-button>
1922
+ <md-icon-button slot="actions" icon="help" aria-label="Help"></md-icon-button>
1923
+ </md-top-app-bar>
1924
+ ```
1925
+
1926
+ ---
1927
+
1928
+ #### Tabs (`md-tabs`, `md-tab`)
1929
+
1930
+ - **Subpath**: `@francofantomius/material-components/tabs`
1931
+ - **Description**: Tabs organize content across different screens, data sets, and other interactions with smooth sliding active indicator bars.
1932
+
1933
+ ##### `<md-tabs>` Properties
1934
+ | Name | Type | Default | Description |
1935
+ | :--- | :--- | :--- | :--- |
1936
+ | `active-index` | `number` | `0` | 0-based index of currently active tab |
1937
+
1938
+ ##### `<md-tab>` Properties
1939
+ | Name | Type | Default | Description |
1940
+ | :--- | :--- | :--- | :--- |
1941
+ | `label` | `string` | `''` | Tab text title |
1942
+ | `icon` | `string` | `''` | Material Symbols icon |
1943
+ | `active` | `boolean` | `false` | Active selection state |
1944
+ | `disabled` | `boolean` | `false` | Disables tab selection |
1945
+
1946
+ ##### Events
1947
+ - `change`: Fired when active tab selection changes (`detail: { activeIndex: number }`).
1948
+
1949
+ ##### Code Example
1950
+ ```html
1951
+ <md-tabs active-index="0" id="demo-tab-bar">
1952
+ <md-tab icon="home" label="Home"></md-tab>
1953
+ <md-tab icon="explore" label="Explore"></md-tab>
1954
+ <md-tab icon="person" label="Profile"></md-tab>
1955
+ <md-tab icon="settings" label="Settings"></md-tab>
1956
+ </md-tabs>
1957
+ ```
1958
+
1959
+ ---
1960
+
1961
+ #### App Drawer (`md-app-drawer`, `md-app-drawer-item`)
1962
+
1963
+ - **Subpath**: `@francofantomius/material-components/app-drawer`
1964
+ - **Description**: App drawers provide a popover grid menu of applications, shortcuts, and services, typically positioned next to the account avatar or in top app bars. Includes drag-and-drop & keyboard reordering.
1965
+
1966
+ ##### `<md-app-drawer>` Properties
1967
+ | Name | Type | Default | Description |
1968
+ | :--- | :--- | :--- | :--- |
1969
+ | `open` | `boolean` | `false` | Controls whether app drawer popover is open |
1970
+ | `headline` | `string` | `''` | Optional header title displayed at the top |
1971
+ | `icon` | `string` | `'apps'` | Material icon name for default trigger button |
1972
+ | `aria-label` | `string` | `'App launcher'` | Accessible label for trigger button & popover |
1973
+ | `trigger` | `boolean` | `true` | Whether to render built-in trigger icon button |
1974
+ | `alignment` | `'start' \| 'end'` | `'end'` | Horizontal alignment of popover relative to trigger |
1975
+ | `pivot` | `'left' \| 'right'` | `'right'` | Anchor pivot edge |
1976
+ | `modal` | `boolean` | `false` | Shows dimming modal backdrop when open |
1977
+ | `fullscreen` | `boolean` | `false` | Forces full-screen display (automatic on mobile viewports) |
1978
+ | `columns` | `number` | `3` | Number of columns in app grid |
1979
+ | `reorderable` | `boolean` | `true` | Enables drag-and-drop and keyboard reordering of apps |
1980
+ | `editable` | `boolean` | `true` | Shows edit icon button on top-right to toggle reordering |
1981
+ | `editing` | `boolean` | `false` | Controls whether app drawer is in reordering/editing mode |
1982
+ | `storage-key` | `string` | `''` | Custom localStorage key for persisting app order |
1983
+ | `disable-storage` | `boolean` | `false` | Disables automatic saving and loading of app order |
1984
+
1985
+ ##### `<md-app-drawer-item>` Properties
1986
+ | Name | Type | Default | Description |
1987
+ | :--- | :--- | :--- | :--- |
1988
+ | `label` | `string` | `''` | Primary label for app |
1989
+ | `headline` | `string` | `''` | Alias for label |
1990
+ | `icon` | `string` | `''` | Material Symbols icon name |
1991
+ | `src` | `string` | `''` | Optional image or logo URL |
1992
+ | `badge` | `string` | `''` | Optional counter or notification badge |
1993
+ | `href` | `string` | `''` | Navigation URL |
1994
+ | `target` | `string` | `''` | Link target attribute |
1995
+ | `disabled` | `boolean` | `false` | Disables user interaction |
1996
+ | `active` | `boolean` | `false` | Active / highlighted state |
1997
+
1998
+ ##### Slots
1999
+ - `trigger`: Custom trigger element replacing default icon button.
2000
+ - `back-button`: Custom back/close button element for full-screen/mobile view.
2001
+ - `header`: Header content above app grid.
2002
+ - `edit-button`: Custom edit button replacing header reorder toggle button.
2003
+ - `reset-button`: Custom reset button restoring default order.
2004
+ - `(default)`: Container for `md-app-drawer-item` elements.
2005
+ - `footer`: Footer content below app grid.
2006
+
2007
+ ##### Events
2008
+ - `open`: Dispatched when app drawer opens.
2009
+ - `close`: Dispatched when app drawer closes.
2010
+ - `item-click`: Dispatched when an app item is selected.
2011
+ - `reorder`: Dispatched when apps are reordered.
2012
+ - `reset`: Dispatched when app order is reset to default.
2013
+ - `edit-toggle`: Dispatched when reordering edit mode is toggled.
2014
+
2015
+ ##### Code Example
2016
+ ```html
2017
+ <md-app-drawer id="demo-app-drawer" headline="Apps">
2018
+ <md-app-drawer-item icon="mail" label="Mail" badge="5"></md-app-drawer-item>
2019
+ <md-app-drawer-item icon="calendar_today" label="Calendar"></md-app-drawer-item>
2020
+ <md-app-drawer-item icon="folder" label="Drive"></md-app-drawer-item>
2021
+ <md-app-drawer-item icon="chat" label="Chat"></md-app-drawer-item>
2022
+ <md-app-drawer-item icon="videocam" label="Meet"></md-app-drawer-item>
2023
+ <md-app-drawer-item icon="contacts" label="Contacts"></md-app-drawer-item>
2024
+ <div slot="footer" style="padding: 4px 0; display: flex; justify-content: center;">
2025
+ <md-button variant="outlined">More apps</md-button>
2026
+ </div>
2027
+ </md-app-drawer>
2028
+ ```
2029
+
2030
+ ---
2031
+
2032
+ #### Account Menu (`md-account-menu`, `md-account-item`)
2033
+
2034
+ - **Subpath**: `@francofantomius/material-components/account-menu`
2035
+ - **Description**: Profile menu and account switcher that displays user credentials, role details, security status, storage quotas, and multiple account management.
2036
+
2037
+ ##### `<md-account-menu>` Properties
2038
+ | Name | Type | Default | Description |
2039
+ | :--- | :--- | :--- | :--- |
2040
+ | `open` | `boolean` | `false` | Controls whether account menu popover is open |
2041
+ | `name` | `string` | `'Franco Fantomius'` | Display name of active user |
2042
+ | `email` | `string` | `'franco.fantomius@example.com'` | Primary email address |
2043
+ | `avatar` | `string` | `''` | URL to avatar image |
2044
+ | `initials` | `string` | `''` | Fallback initials if avatar is not set |
2045
+ | `headline` | `string` | `'Account'` | Header text |
2046
+ | `manage-text` | `string` | `'Manage your Account'` | Label for main account management button |
2047
+ | `manage-url` | `string` | `''` | Navigation URL for account management |
2048
+ | `organization` | `string` | `'Material Components'` | Company or organization name |
2049
+ | `role-title` | `string` | `'Lead Architect'` | User role or job title |
2050
+ | `status` | `string` | `'Active'` | Account status badge |
2051
+ | `storage-used` | `string` | `'10.4 GB'` | Storage amount currently used |
2052
+ | `storage-total` | `string` | `'15 GB'` | Total storage capacity |
2053
+ | `storage-progress` | `number` | `0.69` | Storage usage ratio between 0 and 1 |
2054
+ | `security-status` | `string` | `'Protected'` | Security and 2FA status |
2055
+ | `show-tabs` | `boolean` | `true` | Renders Overview, Security, Storage, and Accounts tabs |
2056
+ | `alignment` | `'start' \| 'end'` | `'end'` | Horizontal alignment of popover relative to trigger |
2057
+ | `pivot` | `'left' \| 'right'` | `'right'` | Anchor pivot edge |
2058
+ | `modal` | `boolean` | `false` | Shows dimming modal backdrop when open |
2059
+ | `fullscreen` | `boolean` | `false` | Forces full-screen display (automatic on mobile viewports) |
2060
+
2061
+ ##### `<md-account-item>` Properties
2062
+ | Name | Type | Default | Description |
2063
+ | :--- | :--- | :--- | :--- |
2064
+ | `name` | `string` | `''` | Account profile name |
2065
+ | `email` | `string` | `''` | Account email address |
2066
+ | `avatar` | `string` | `''` | Avatar image URL |
2067
+ | `initials` | `string` | `''` | Avatar initials |
2068
+ | `icon` | `string` | `''` | Icon name |
2069
+ | `active` | `boolean` | `false` | Marks account as currently active |
2070
+ | `action` | `boolean` | `false` | Action item mode (e.g. Add another account) |
2071
+ | `disabled` | `boolean` | `false` | Disables interaction |
2072
+
2073
+ ##### Slots
2074
+ - `trigger`: Custom trigger element replacing default avatar button.
2075
+ - `back-button`: Custom back/close button element for full-screen/mobile view.
2076
+ - `header`: Custom header content.
2077
+ - `overview`: Custom content for Overview tab.
2078
+ - `security`: Custom content for Security tab.
2079
+ - `storage`: Custom content for Storage tab.
2080
+ - `accounts`: Container for `md-account-item` instances.
2081
+ - `footer`: Custom footer content (e.g. Sign out action).
2082
+
2083
+ ##### Events
2084
+ - `open`: Dispatched when account menu opens.
2085
+ - `close`: Dispatched when account menu closes.
2086
+ - `tab-change`: Dispatched when user switches tabs (`detail: { tab }`).
2087
+ - `account-select`: Dispatched when an account profile is chosen.
2088
+ - `manage-click`: Dispatched when Manage Account button is clicked.
2089
+ - `sign-out`: Dispatched when Sign out button is clicked.
2090
+ - `edit-avatar`: Dispatched when avatar photo edit button is clicked.
2091
+
2092
+ ##### Code Example
2093
+ ```html
2094
+ <md-account-menu
2095
+ id="demo-account-menu"
2096
+ name="Franco Fantomius"
2097
+ email="franco.fantomius@example.com"
2098
+ initials="F"
2099
+ role-title="Lead Architect"
2100
+ organization="Material Components Team"
2101
+ storage-used="10.4 GB"
2102
+ storage-total="15 GB"
2103
+ storage-progress="0.69"
2104
+ >
2105
+ <md-account-item
2106
+ slot="accounts"
2107
+ name="Franco Fantomius"
2108
+ email="franco.fantomius@example.com"
2109
+ initials="F"
2110
+ active
2111
+ ></md-account-item>
2112
+ <md-account-item
2113
+ slot="accounts"
2114
+ name="Work Workspace"
2115
+ email="franco.dev@work.corp"
2116
+ initials="W"
2117
+ ></md-account-item>
2118
+ <md-account-item
2119
+ slot="accounts"
2120
+ name="Add another account"
2121
+ icon="person_add"
2122
+ action
2123
+ ></md-account-item>
2124
+ </md-account-menu>
2125
+ ```
2126
+
2127
+ ---
2128
+
2129
+ ### Media & Playback
2130
+
2131
+ #### Player (`md-player`)
2132
+
2133
+ - **Subpath**: `@francofantomius/material-components/player`
2134
+ - **Description**: Material Design 3 media player component supporting audio and video playback, responsive compact and large-screen layouts, artwork/posters, interactive progress scrubbing, always-visible volume controls, queue toggle, playback rates, and keyboard shortcuts.
2135
+
2136
+ ##### Properties & Attributes
2137
+ | Name | Type | Default | Description |
2138
+ | :--- | :--- | :--- | :--- |
2139
+ | `src` | `string` | `''` | Media source URL for audio or video playback |
2140
+ | `type` | `'audio' \| 'video'` | `'audio'` | Type of media to render |
2141
+ | `variant` | `'elevated' \| 'filled' \| 'outlined' \| 'compact' \| 'full'` | `'elevated'` | Surface container style or layout variant |
2142
+ | `track-title` | `string` | `''` | Title of current track or video |
2143
+ | `artist` | `string` | `''` | Artist or author name |
2144
+ | `album` | `string` | `''` | Album or series name |
2145
+ | `poster` | `string` | `''` | Artwork / poster image URL |
2146
+ | `currentTime` | `number` | `0` | Current playback position in seconds |
2147
+ | `duration` | `number` | `0` | Total media duration in seconds |
2148
+ | `volume` | `number` | `1` | Audio volume level (0.0 to 1.0) |
2149
+ | `muted` | `boolean` | `false` | Mutes media audio output |
2150
+ | `playback-rate` | `number` | `1` | Speed multiplier (0.5x to 2x) |
2151
+ | `paused` | `boolean` | `true` | Playback pause state |
2152
+ | `loop` | `boolean` | `false` | Repeats track when finished |
2153
+ | `autoplay` | `boolean` | `false` | Automatically begins playback on load |
2154
+ | `compact` | `boolean` | `false` | Forces minimal single-row bar layout |
2155
+ | `show-skip` | `boolean` | `true` | Shows previous and next track buttons |
2156
+ | `show-seek` | `boolean` | `true` | Shows rewind and fast-forward 10s buttons |
2157
+ | `show-volume` | `boolean` | `true` | Shows always-visible volume button and slider |
2158
+ | `show-playback-rate` | `boolean` | `true` | Shows playback rate cycle button |
2159
+ | `show-queue` | `boolean` | `true` | Shows music queue toggle button |
2160
+ | `seek-step` | `number` | `10` | Seconds to skip with rewind/forward controls |
2161
+
2162
+ ##### Slots
2163
+ - `media`: Custom native `<audio>` or `<video>` element.
2164
+ - `artwork`: Custom album artwork or video thumbnail element.
2165
+ - `title`: Custom title header content.
2166
+ - `artist`: Custom artist or subtitle content.
2167
+ - `actions`: Custom action buttons (like, share, playlist).
2168
+ - `(default)`: Additional content below controls (lyrics, playlist).
2169
+
2170
+ ##### Events
2171
+ - `play`: Fired when playback begins.
2172
+ - `pause`: Fired when playback is paused.
2173
+ - `timeupdate`: Fired periodically as time updates (`detail: { currentTime: number, duration: number, progress: number }`).
2174
+ - `seeked`: Fired after seeking (`detail: { currentTime: number }`).
2175
+ - `volumechange`: Fired when volume or mute changes (`detail: { volume: number, muted: boolean }`).
2176
+ - `ratechange`: Fired when playback rate is modified (`detail: { playbackRate: number }`).
2177
+ - `queue`: Fired when queue button is toggled (`detail: { open: boolean }`).
2178
+ - `previous`: Fired on previous button click.
2179
+ - `next`: Fired on next button click.
2180
+ - `ended`: Fired when media playback ends.
2181
+ - `fullscreenchange`: Fired when fullscreen state changes in video mode (`detail: { fullscreen: boolean }`).
2182
+
2183
+ ##### JavaScript API Methods
2184
+ - `play()`: Begins or resumes playback.
2185
+ - `pause()`: Pauses active playback.
2186
+ - `togglePlay()`: Toggles between play and pause.
2187
+ - `seek(timeInSeconds)`: Jumps directly to timestamp.
2188
+ - `seekBy(deltaSeconds)`: Relative seek forward/backward.
2189
+ - `setVolume(level)`: Sets volume (0.0 to 1.0).
2190
+ - `toggleMute()`: Toggles audio mute state.
2191
+ - `toggleQueue()`: Toggles music queue state.
2192
+ - `cyclePlaybackRate()`: Cycles speed rates (0.5x, 0.75x, 1x, 1.25x, 1.5x, 2x).
2193
+ - `toggleFullscreen()`: Toggles fullscreen video mode.
2194
+
2195
+ ##### Code Example
2196
+ ```html
2197
+ <!-- Full Audio Player -->
2198
+ <md-player
2199
+ track-title="Midnight City Dreams"
2200
+ artist="Synthetic Horizons"
2201
+ album="Future Echoes (2026)"
2202
+ poster="https://picsum.photos/seed/music/300/300"
2203
+ duration="214"
2204
+ current-time="45"
2205
+ ></md-player>
2206
+
2207
+ <!-- Compact Bar Player -->
2208
+ <md-player
2209
+ compact
2210
+ variant="outlined"
2211
+ track-title="Episode 42: Modern Web Design"
2212
+ artist="Tech Talk Daily"
2213
+ poster="https://picsum.photos/seed/podcast/200/200"
2214
+ duration="1820"
2215
+ ></md-player>
2216
+
2217
+ <!-- Video Player Mode -->
2218
+ <md-player
2219
+ type="video"
2220
+ src="https://example.com/sample.mp4"
2221
+ track-title="Material Design 3 Interactive Experience"
2222
+ poster="https://picsum.photos/seed/video/800/450"
2223
+ ></md-player>
2224
+ ```
2225
+
2226
+ ---
2227
+
2228
+ ### Utilities & Data
2229
+
2230
+ #### Icon (`md-icon`)
2231
+
2232
+ - **Subpath**: `@francofantomius/material-components/icon`
2233
+ - **Description**: Icons visually communicate meaning, actions, and status using Google Material Symbols variable font glyphs or custom slotted SVGs.
2234
+
2235
+ ##### Properties & Attributes
2236
+ | Name | Type | Default | Description |
2237
+ | :--- | :--- | :--- | :--- |
2238
+ | `name` | `string` | `''` | Material Symbols font glyph identifier |
2239
+ | `filled` | `boolean` | `false` | Enables filled variation in variable font |
2240
+ | `size` | `string` | `''` | Custom CSS font size (e.g. `32`, `2rem`) |
2241
+
2242
+ ##### Code Example
2243
+ ```html
2244
+ <md-icon name="favorite"></md-icon>
2245
+ <md-icon name="favorite" filled style="color: var(--md-sys-color-error);"></md-icon>
2246
+ <md-icon name="settings" size="32"></md-icon>
2247
+ <md-icon name="rocket_launch" size="48" style="color: var(--md-sys-color-primary);"></md-icon>
2248
+ ```
2249
+
2250
+ ---
2251
+
2252
+ #### Code Block & Highlighter (`md-code`)
2253
+
2254
+ - **Subpath**: `@francofantomius/material-components/code`
2255
+ - **Description**: Code component with syntax highlighting for popular languages, real-time multi-language linting diagnostics, line numbers, line highlighting, and one-click copy to clipboard.
2256
+
2257
+ ##### Properties & Attributes
2258
+ | Name | Type | Default | Description |
2259
+ | :--- | :--- | :--- | :--- |
2260
+ | `code` | `string` | `''` | Source code content string (falls back to slot/textContent) |
2261
+ | `language` / `lang` | `string` | `'plaintext'` | Syntax language: `javascript`, `typescript`, `html`, `css`, `json`, `python`, `bash`, `sql`, `yaml`, `markdown` |
2262
+ | `label` / `filename` | `string` | `''` | Header label or filename (e.g. `"button.ts"`, `"package.json"`) |
2263
+ | `lint` | `boolean` | `false` | Enables built-in real-time multi-language syntax linting |
2264
+ | `diagnostics` | `LintDiagnostic[]` | `[]` | Array of custom diagnostic issues to display (`{ line, column, message, severity, rule }`) |
2265
+ | `show-lint-summary` | `boolean` | `true` | Whether to show the collapsible lint issues summary footer bar |
2266
+ | `line-numbers` | `boolean` | `false` | Renders line numbers gutter |
2267
+ | `highlight-lines` | `string` | `''` | Comma-separated line numbers or ranges to highlight (e.g. `"1, 3-5, 8"`) |
2268
+ | `copyable` | `boolean` | `true` | Enables clipboard copying functionality |
2269
+ | `hide-copy-button` | `boolean` | `false` | Hides the copy button from the header |
2270
+ | `wrap-lines` | `boolean` | `false` | Wraps long lines instead of horizontal scrolling |
2271
+ | `max-height` | `string` | `''` | Maximum height of code scroll area (e.g. `"300px"`) |
2272
+
2273
+ ##### Slots
2274
+ - `(default)`: Source code text when `code` property is omitted.
2275
+ - `actions`: Additional action buttons placed in header bar.
2276
+
2277
+ ##### Events
2278
+ - `copy`: Fired when code is copied to clipboard (`detail: { code: string }`).
2279
+ - `lint-complete`: Fired after linting finishes (`detail: { diagnostics: LintDiagnostic[], isValid: boolean }`).
2280
+
2281
+ ##### CSS Variables
2282
+ | Variable | Default | Description |
2283
+ | :--- | :--- | :--- |
2284
+ | `--md-code-bg` | `var(--md-sys-color-surface-container)` | Background color of code block |
2285
+ | `--md-code-header-bg` | `var(--md-sys-color-surface-container-high)` | Background color of header bar |
2286
+ | `--md-code-border` | `var(--md-sys-color-outline-variant)` | Border color of container |
2287
+ | `--md-code-color` | `var(--md-sys-color-on-surface)` | Default text color of code tokens |
2288
+ | `--md-code-gutter-color` | `var(--md-sys-color-outline)` | Text color of line numbers |
2289
+ | `--md-code-radius` | `var(--md-sys-shape-corner-medium, 12px)` | Corner border radius |
2290
+ | `--md-code-font-size` | `13.5px` | Font size of the code |
2291
+ | `--md-code-line-height` | `1.6` | Line height multiplier |
2292
+
2293
+ ##### Code Example
2294
+ ```html
2295
+ <md-code
2296
+ language="typescript"
2297
+ label="src/index.ts"
2298
+ line-numbers
2299
+ highlight-lines="4, 7-9"
2300
+ >
2301
+ import { LitElement, html, css } from 'lit';
2302
+ import { customElement, property } from 'lit/decorators.js';
2303
+
2304
+ @customElement('my-counter')
2305
+ export class MyCounter extends LitElement {
2306
+ @property({ type: Number }) count = 0;
2307
+
2308
+ private increment() {
2309
+ this.count += 1;
2310
+ }
2311
+
2312
+ render() {
2313
+ return html`<button @click=${this.increment}>Count: ${this.count}</button>`;
2314
+ }
2315
+ }
2316
+ </md-code>
2317
+
2318
+ <!-- Real-time Linting -->
2319
+ <md-code language="json" label="package.json" line-numbers lint>
2320
+ {
2321
+ "name": "@francofantomius/material-components",
2322
+ "version": "1.0.0"
2323
+ }
2324
+ </md-code>
2325
+ ```
2326
+