material-inspired-component-library 8.1.1 → 9.0.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 (283) hide show
  1. package/README.md +106 -18
  2. package/components/README.md +1 -1
  3. package/components/accordion/README.md +6 -6
  4. package/components/alert/README.md +10 -10
  5. package/components/alert/index.scss +27 -52
  6. package/components/appbar/README.md +19 -6
  7. package/components/appbar/index.scss +40 -44
  8. package/components/badge/README.md +12 -10
  9. package/components/badge/index.scss +21 -25
  10. package/components/bottomsheet/README.md +26 -1
  11. package/components/bottomsheet/index.scss +58 -44
  12. package/components/button/README.md +7 -5
  13. package/components/button/_shared.scss +210 -0
  14. package/components/button/index.scss +49 -283
  15. package/components/card/README.md +97 -85
  16. package/components/card/index.scss +46 -65
  17. package/components/checkbox/README.md +25 -14
  18. package/{tools/shapes/check.mjs → components/checkbox/_label.scss} +37 -42
  19. package/components/checkbox/index.scss +66 -66
  20. package/components/chip/README.md +186 -0
  21. package/components/chip/index.scss +285 -0
  22. package/components/datepicker/README.md +79 -0
  23. package/components/datepicker/index.scss +346 -315
  24. package/components/dialog/README.md +20 -10
  25. package/components/dialog/index.scss +55 -66
  26. package/components/divider/README.md +16 -15
  27. package/components/divider/index.scss +9 -25
  28. package/components/iconbutton/README.md +8 -3
  29. package/components/iconbutton/index.scss +83 -186
  30. package/components/list/README.md +89 -156
  31. package/components/list/index.scss +34 -36
  32. package/components/menu/README.md +81 -155
  33. package/components/menu/index.scss +52 -58
  34. package/components/navigationbar/README.md +108 -0
  35. package/components/navigationbar/index.scss +185 -0
  36. package/components/navigationrail/README.md +60 -36
  37. package/components/navigationrail/_navitem.scss +96 -0
  38. package/components/navigationrail/index.scss +76 -130
  39. package/components/progressindicator/README.md +83 -47
  40. package/components/progressindicator/index.scss +622 -172
  41. package/components/radio/README.md +11 -9
  42. package/components/radio/index.scss +36 -33
  43. package/components/select/README.md +12 -7
  44. package/components/select/index.scss +26 -34
  45. package/components/shapes/README.md +3 -3
  46. package/components/shapes/index.scss +0 -1
  47. package/components/sidesheet/README.md +21 -9
  48. package/components/sidesheet/index.scss +38 -46
  49. package/components/slider/README.md +21 -0
  50. package/components/slider/index.scss +108 -139
  51. package/components/snackbar/README.md +32 -35
  52. package/components/snackbar/index.scss +10 -22
  53. package/components/stepper/README.md +14 -7
  54. package/components/stepper/index.scss +58 -39
  55. package/components/switch/README.md +22 -15
  56. package/components/switch/index.scss +68 -60
  57. package/components/textfield/README.md +48 -5
  58. package/components/textfield/index.scss +192 -248
  59. package/components/timepicker/README.md +53 -23
  60. package/components/timepicker/index.scss +110 -128
  61. package/dist/alert.css +1 -1
  62. package/dist/alert.js +1 -1
  63. package/dist/appbar.css +1 -1
  64. package/dist/appbar.js +1 -1
  65. package/dist/badge.css +1 -1
  66. package/dist/badge.js +1 -1
  67. package/dist/base.css +1 -0
  68. package/dist/base.js +1 -0
  69. package/dist/bottomsheet.css +1 -1
  70. package/dist/bottomsheet.js +1 -1
  71. package/dist/button.css +1 -1
  72. package/dist/button.js +1 -1
  73. package/dist/card.css +1 -1
  74. package/dist/card.js +1 -1
  75. package/dist/checkbox.css +1 -1
  76. package/dist/checkbox.js +1 -1
  77. package/dist/chip.css +1 -0
  78. package/dist/chip.js +1 -0
  79. package/dist/components/iconbutton/index.d.ts +2 -7
  80. package/dist/components/slider/index.d.ts +1 -1
  81. package/dist/components/textfield/index.d.ts +2 -2
  82. package/dist/datepicker.css +1 -1
  83. package/dist/datepicker.js +1 -1
  84. package/dist/dialog.css +1 -1
  85. package/dist/dialog.js +1 -1
  86. package/dist/divider.css +1 -1
  87. package/dist/divider.js +1 -1
  88. package/dist/field.css +1 -0
  89. package/dist/field.js +1 -0
  90. package/dist/foundations/form/index.js +1 -1
  91. package/dist/foundations/runtime.d.ts +15 -0
  92. package/dist/foundations/runtime.js +1 -0
  93. package/dist/iconbutton.css +1 -1
  94. package/dist/iconbutton.js +1 -1
  95. package/dist/layout.css +1 -1
  96. package/dist/layout.js +1 -1
  97. package/dist/list.css +1 -1
  98. package/dist/list.js +1 -1
  99. package/dist/menu.css +1 -1
  100. package/dist/menu.js +1 -1
  101. package/dist/micl.css +1 -1
  102. package/dist/micl.d.ts +14 -5
  103. package/dist/micl.js +1 -1
  104. package/dist/navigationbar.css +1 -0
  105. package/dist/navigationbar.js +1 -0
  106. package/dist/navigationrail.css +1 -1
  107. package/dist/navigationrail.js +1 -1
  108. package/dist/progressindicator.css +1 -1
  109. package/dist/progressindicator.js +1 -1
  110. package/dist/radio.css +1 -1
  111. package/dist/radio.js +1 -1
  112. package/dist/scrollbar.js +1 -1
  113. package/dist/select.css +1 -1
  114. package/dist/select.js +1 -1
  115. package/dist/shapes.css +1 -1
  116. package/dist/shapes.js +1 -1
  117. package/dist/sidesheet.css +1 -1
  118. package/dist/sidesheet.js +1 -1
  119. package/dist/slider.css +1 -1
  120. package/dist/slider.js +1 -1
  121. package/dist/snackbar.css +1 -1
  122. package/dist/snackbar.js +1 -1
  123. package/dist/stepper.css +1 -1
  124. package/dist/stepper.js +1 -1
  125. package/dist/switch.css +1 -1
  126. package/dist/switch.js +1 -1
  127. package/dist/textfield.css +1 -1
  128. package/dist/textfield.js +1 -1
  129. package/dist/timepicker.css +1 -1
  130. package/dist/timepicker.js +1 -1
  131. package/foundations/_index.scss +35 -0
  132. package/foundations/{index.scss → base/index.scss} +21 -56
  133. package/foundations/field/index.scss +37 -0
  134. package/foundations/layout/index.scss +64 -65
  135. package/package.json +23 -9
  136. package/styles/statelayer.scss +20 -5
  137. package/styles.scss +5 -2
  138. package/.claude/settings.local.json +0 -17
  139. package/.editorconfig +0 -12
  140. package/.gitattributes +0 -9
  141. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -35
  142. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  143. package/CLAUDE.md +0 -53
  144. package/CODE_OF_CONDUCT.md +0 -128
  145. package/components/bottomsheet/index.ts +0 -153
  146. package/components/button/index.ts +0 -79
  147. package/components/checkbox/index.ts +0 -148
  148. package/components/datepicker/index.ts +0 -693
  149. package/components/iconbutton/index.ts +0 -77
  150. package/components/list/index.ts +0 -138
  151. package/components/menu/index.ts +0 -145
  152. package/components/navigationrail/index.ts +0 -87
  153. package/components/progressindicator/index.ts +0 -77
  154. package/components/slider/index.ts +0 -149
  155. package/components/snackbar/index.ts +0 -118
  156. package/components/stepper/index.ts +0 -248
  157. package/components/textfield/index.ts +0 -188
  158. package/components/timepicker/index.ts +0 -413
  159. package/dist/components/progressindicator/index.d.ts +0 -6
  160. package/dist/foundations.css +0 -1
  161. package/dist/foundations.js +0 -1
  162. package/docs/accordion.html +0 -344
  163. package/docs/alert.html +0 -177
  164. package/docs/bottomsheet.html +0 -240
  165. package/docs/button.html +0 -291
  166. package/docs/card-awards.webp +0 -0
  167. package/docs/card-cabinet.webp +0 -0
  168. package/docs/card-city.webp +0 -0
  169. package/docs/card-fingerprint.webp +0 -0
  170. package/docs/card-holiday.webp +0 -0
  171. package/docs/card-names.webp +0 -0
  172. package/docs/card.html +0 -159
  173. package/docs/checkbox.html +0 -147
  174. package/docs/datepicker.html +0 -274
  175. package/docs/dialog.html +0 -195
  176. package/docs/divider.html +0 -139
  177. package/docs/docs.css +0 -26
  178. package/docs/docs.js +0 -139
  179. package/docs/iconbutton.html +0 -331
  180. package/docs/index.html +0 -431
  181. package/docs/list.html +0 -310
  182. package/docs/menu.html +0 -574
  183. package/docs/micl.css +0 -1
  184. package/docs/micl.js +0 -1
  185. package/docs/navigationrail.html +0 -138
  186. package/docs/progressindicator.html +0 -288
  187. package/docs/radio.html +0 -123
  188. package/docs/select.html +0 -337
  189. package/docs/shapes.css +0 -1
  190. package/docs/shapes.html +0 -159
  191. package/docs/shapes.js +0 -1
  192. package/docs/sidesheet.html +0 -149
  193. package/docs/slider.html +0 -141
  194. package/docs/snackbar.html +0 -102
  195. package/docs/stepper.html +0 -319
  196. package/docs/switch.html +0 -196
  197. package/docs/textfield.html +0 -208
  198. package/docs/themes/airblue/dark-hc.css +0 -51
  199. package/docs/themes/airblue/dark-mc.css +0 -51
  200. package/docs/themes/airblue/dark.css +0 -51
  201. package/docs/themes/airblue/light-hc.css +0 -51
  202. package/docs/themes/airblue/light-mc.css +0 -51
  203. package/docs/themes/airblue/light.css +0 -51
  204. package/docs/themes/airblue/theme.css +0 -306
  205. package/docs/themes/barnred/dark-hc.css +0 -51
  206. package/docs/themes/barnred/dark-mc.css +0 -51
  207. package/docs/themes/barnred/dark.css +0 -51
  208. package/docs/themes/barnred/light-hc.css +0 -51
  209. package/docs/themes/barnred/light-mc.css +0 -51
  210. package/docs/themes/barnred/light.css +0 -51
  211. package/docs/themes/barnred/theme.css +0 -306
  212. package/docs/themes/citrine/dark-hc.css +0 -51
  213. package/docs/themes/citrine/dark-mc.css +0 -51
  214. package/docs/themes/citrine/dark.css +0 -51
  215. package/docs/themes/citrine/light-hc.css +0 -51
  216. package/docs/themes/citrine/light-mc.css +0 -51
  217. package/docs/themes/citrine/light.css +0 -51
  218. package/docs/themes/citrine/theme.css +0 -306
  219. package/docs/themes/gray/dark-hc.css +0 -51
  220. package/docs/themes/gray/dark-mc.css +0 -51
  221. package/docs/themes/gray/dark.css +0 -51
  222. package/docs/themes/gray/light-hc.css +0 -51
  223. package/docs/themes/gray/light-mc.css +0 -51
  224. package/docs/themes/gray/light.css +0 -51
  225. package/docs/themes/gray/theme.css +0 -306
  226. package/docs/themes/greenery/dark-hc.css +0 -51
  227. package/docs/themes/greenery/dark-mc.css +0 -51
  228. package/docs/themes/greenery/dark.css +0 -51
  229. package/docs/themes/greenery/light-hc.css +0 -51
  230. package/docs/themes/greenery/light-mc.css +0 -51
  231. package/docs/themes/greenery/light.css +0 -51
  232. package/docs/themes/greenery/theme.css +0 -306
  233. package/docs/themes/hermana/dark-hc.css +0 -51
  234. package/docs/themes/hermana/dark-mc.css +0 -51
  235. package/docs/themes/hermana/dark.css +0 -51
  236. package/docs/themes/hermana/light-hc.css +0 -51
  237. package/docs/themes/hermana/light-mc.css +0 -51
  238. package/docs/themes/hermana/light.css +0 -51
  239. package/docs/themes/hermana/theme.css +0 -306
  240. package/docs/themes/illuminating/dark-hc.css +0 -51
  241. package/docs/themes/illuminating/dark-mc.css +0 -51
  242. package/docs/themes/illuminating/dark.css +0 -51
  243. package/docs/themes/illuminating/light-hc.css +0 -51
  244. package/docs/themes/illuminating/light-mc.css +0 -51
  245. package/docs/themes/illuminating/light.css +0 -51
  246. package/docs/themes/illuminating/theme.css +0 -306
  247. package/docs/themes/magenta/dark-hc.css +0 -51
  248. package/docs/themes/magenta/dark-mc.css +0 -51
  249. package/docs/themes/magenta/dark.css +0 -51
  250. package/docs/themes/magenta/light-hc.css +0 -51
  251. package/docs/themes/magenta/light-mc.css +0 -51
  252. package/docs/themes/magenta/light.css +0 -51
  253. package/docs/themes/magenta/theme.css +0 -306
  254. package/docs/themes/mocha/dark-hc.css +0 -51
  255. package/docs/themes/mocha/dark-mc.css +0 -51
  256. package/docs/themes/mocha/dark.css +0 -51
  257. package/docs/themes/mocha/light-hc.css +0 -51
  258. package/docs/themes/mocha/light-mc.css +0 -51
  259. package/docs/themes/mocha/light.css +0 -51
  260. package/docs/themes/mocha/theme.css +0 -306
  261. package/docs/themes/olivegreen/dark-hc.css +0 -51
  262. package/docs/themes/olivegreen/dark-mc.css +0 -51
  263. package/docs/themes/olivegreen/dark.css +0 -51
  264. package/docs/themes/olivegreen/light-hc.css +0 -51
  265. package/docs/themes/olivegreen/light-mc.css +0 -51
  266. package/docs/themes/olivegreen/light.css +0 -51
  267. package/docs/themes/olivegreen/theme.css +0 -306
  268. package/docs/themes/peri/dark-hc.css +0 -51
  269. package/docs/themes/peri/dark-mc.css +0 -51
  270. package/docs/themes/peri/dark.css +0 -51
  271. package/docs/themes/peri/light-hc.css +0 -51
  272. package/docs/themes/peri/light-mc.css +0 -51
  273. package/docs/themes/peri/light.css +0 -51
  274. package/docs/themes/peri/theme.css +0 -306
  275. package/docs/timepicker.html +0 -160
  276. package/foundations/form/index.ts +0 -174
  277. package/foundations/layout/README.md +0 -127
  278. package/intl.d.ts +0 -9
  279. package/micl.ts +0 -221
  280. package/styles/README.md +0 -196
  281. package/tools/shapes/generate.mjs +0 -828
  282. package/tsconfig.json +0 -116
  283. package/webpack.config.js +0 -159
@@ -19,7 +19,6 @@
19
19
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
20
  // SOFTWARE.
21
21
 
22
- @use '../../foundations';
23
22
  @use '../../styles/elevation';
24
23
  @use '../../styles/motion';
25
24
  @use '../../styles/shape';
@@ -43,23 +42,17 @@
43
42
  @include typography.scale('label-small');
44
43
  @include typography.scale('body-small');
45
44
 
46
- :root {
47
- --md-comp-menu-width-max: 320px;
48
- --md-comp-menu-width-min: 112px;
49
- }
50
-
51
45
  $menu-padding-block: 4px;
52
46
  $item-classes: ':is(.micl-list-item-one, .micl-list-item-two, .micl-list-item-three)';
53
47
 
54
- @mixin menu-color-set(
55
- $variant,
56
- $container,
57
- $on-container,
58
- $on-container-strong,
59
- $on-icon-active,
60
- $selected-container,
61
- $on-selected
62
- ) {
48
+ @mixin menu-color-set($variant) {
49
+ $container: var(--_menu-item-bg);
50
+ $on-container: var(--_menu-on);
51
+ $on-container-strong: var(--_menu-on-strong);
52
+ $on-icon-active: var(--_menu-icon-active);
53
+ $selected-container: var(--_menu-selected-bg);
54
+ $on-selected: var(--_menu-on-selected);
55
+
63
56
  --md-comp-list-item-container-color: var(--md-comp-menu-#{$variant}-menu-item-container-color, #{$container});
64
57
  --md-comp-list-item-label-text-color: var(--md-comp-menu-#{$variant}-menu-item-label-text-color, #{$on-container});
65
58
  --md-comp-list-item-leading-icon-color: var(--md-comp-menu-#{$variant}-menu-item-leading-icon-color, #{$on-container});
@@ -68,15 +61,15 @@ $item-classes: ':is(.micl-list-item-one, .micl-list-item-two, .micl-list-item-th
68
61
  --md-comp-list-item-trailing-supporting-text-color: var(--md-comp-menu-#{$variant}-menu-item-trailing-supporting-text-color, #{$on-container});
69
62
 
70
63
  --md-comp-list-item-disabled-label-text-color: var(--md-comp-menu-#{$variant}-menu-item-disabled-label-text-color, #{$on-container-strong});
71
- --md-comp-list-item-disabled-label-text-opacity: var(--md-comp-menu-#{$variant}-menu-item-disabled-label-text-opacity, var(--md-sys-state-disabled-state-layer-opacity, 38%));
64
+ --md-comp-list-item-disabled-label-text-opacity: var(--md-comp-menu-#{$variant}-menu-item-disabled-label-text-opacity, var(--_menu-do));
72
65
  --md-comp-list-item-disabled-leading-icon-color: var(--md-comp-menu-#{$variant}-menu-item-disabled-leading-icon-color, #{$on-container-strong});
73
- --md-comp-list-item-disabled-leading-icon-opacity: var(--md-comp-menu-#{$variant}-menu-item-disabled-leading-icon-opacity, var(--md-sys-state-disabled-state-layer-opacity, 38%));
66
+ --md-comp-list-item-disabled-leading-icon-opacity: var(--md-comp-menu-#{$variant}-menu-item-disabled-leading-icon-opacity, var(--_menu-do));
74
67
  --md-comp-list-item-disabled-supporting-text-color: var(--md-comp-menu-#{$variant}-menu-item-disabled-supporting-text-color, #{$on-container-strong});
75
- --md-comp-list-item-disabled-supporting-text-opacity: var(--md-comp-menu-#{$variant}-menu-item-disabled-supporting-text-opacity, var(--md-sys-state-disabled-state-layer-opacity, 38%));
68
+ --md-comp-list-item-disabled-supporting-text-opacity: var(--md-comp-menu-#{$variant}-menu-item-disabled-supporting-text-opacity, var(--_menu-do));
76
69
  --md-comp-list-item-disabled-trailing-icon-color: var(--md-comp-menu-#{$variant}-menu-item-disabled-trailing-icon-color, #{$on-container-strong});
77
- --md-comp-list-item-disabled-trailing-icon-opacity: var(--md-comp-menu-#{$variant}-menu-item-disabled-trailing-icon-opacity, var(--md-sys-state-disabled-state-layer-opacity, 38%));
70
+ --md-comp-list-item-disabled-trailing-icon-opacity: var(--md-comp-menu-#{$variant}-menu-item-disabled-trailing-icon-opacity, var(--_menu-do));
78
71
  --md-comp-list-item-disabled-trailing-supporting-text-color: var(--md-comp-menu-#{$variant}-menu-item-disabled-trailing-supporting-text-color, #{$on-container-strong});
79
- --md-comp-list-item-disabled-trailing-supporting-text-opacity: var(--md-comp-menu-#{$variant}-menu-item-disabled-trailing-supporting-text-opacity, var(--md-sys-state-disabled-state-layer-opacity, 38%));
72
+ --md-comp-list-item-disabled-trailing-supporting-text-opacity: var(--md-comp-menu-#{$variant}-menu-item-disabled-trailing-supporting-text-opacity, var(--_menu-do));
80
73
 
81
74
  --md-comp-list-item-focus-label-text-color: var(--md-comp-menu-#{$variant}-menu-item-focused-label-text-color, #{$on-container-strong});
82
75
  --md-comp-list-item-focus-leading-icon-color: var(--md-comp-menu-#{$variant}-menu-item-focused-leading-icon-color, #{$on-icon-active});
@@ -110,15 +103,15 @@ $item-classes: ':is(.micl-list-item-one, .micl-list-item-two, .micl-list-item-th
110
103
  --md-comp-list-item-selected-trailing-supporting-text-color: var(--md-comp-menu-#{$variant}-menu-item-selected-trailing-supporting-text-color, #{$on-selected});
111
104
 
112
105
  --md-comp-list-item-selected-disabled-container-color: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-container-color, #{$selected-container});
113
- --md-comp-list-item-selected-disabled-container-opacity: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-container-opacity, var(--md-sys-state-disabled-state-layer-opacity, 38%));
106
+ --md-comp-list-item-selected-disabled-container-opacity: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-container-opacity, var(--_menu-do));
114
107
  --md-comp-list-item-selected-disabled-label-text-color: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-label-text-color, #{$on-selected});
115
- --md-comp-list-item-selected-disabled-label-text-opacity: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-label-text-opacity, var(--md-sys-state-disabled-state-layer-opacity, 38%));
108
+ --md-comp-list-item-selected-disabled-label-text-opacity: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-label-text-opacity, var(--_menu-do));
116
109
  --md-comp-list-item-selected-disabled-leading-icon-color: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-leading-icon-color, #{$on-selected});
117
- --md-comp-list-item-selected-disabled-leading-icon-opacity: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-leading-icon-opacity, var(--md-sys-state-disabled-state-layer-opacity, 38%));
110
+ --md-comp-list-item-selected-disabled-leading-icon-opacity: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-leading-icon-opacity, var(--_menu-do));
118
111
  --md-comp-list-item-selected-disabled-trailing-icon-color: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-trailing-icon-color, #{$on-selected});
119
- --md-comp-list-item-selected-disabled-trailing-icon-opacity: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-trailing-icon-opacity, var(--md-sys-state-disabled-state-layer-opacity, 38%));
112
+ --md-comp-list-item-selected-disabled-trailing-icon-opacity: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-trailing-icon-opacity, var(--_menu-do));
120
113
  --md-comp-list-item-selected-disabled-trailing-supporting-text-color: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-trailing-supporting-text-color, #{$on-selected});
121
- --md-comp-list-item-selected-disabled-trailing-supporting-text-opacity: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-trailing-supporting-text-opacity, var(--md-sys-state-disabled-state-layer-opacity, 38%));
114
+ --md-comp-list-item-selected-disabled-trailing-supporting-text-opacity: var(--md-comp-menu-#{$variant}-menu-item-selected-disabled-trailing-supporting-text-opacity, var(--_menu-do));
122
115
 
123
116
  --md-comp-list-item-selected-focus-label-text-color: var(--md-comp-menu-#{$variant}-menu-item-selected-focused-label-text-color, #{$on-selected});
124
117
  --md-comp-list-item-selected-focus-leading-icon-color: var(--md-comp-menu-#{$variant}-menu-item-selected-focused-leading-icon-color, #{$on-selected});
@@ -173,15 +166,15 @@ $item-classes: ':is(.micl-list-item-one, .micl-list-item-two, .micl-list-item-th
173
166
  --md-comp-list-item-focus-indicator-offset: var(--md-comp-menu-item-focus-indicator-offset, var(--md-sys-state-focus-indicator-inner-offset, -3px));
174
167
  --md-comp-list-item-focus-indicator-thickness: var(--md-comp-menu-item-focus-indicator-thickness, var(--md-sys-state-focus-indicator-thickness, 3px));
175
168
 
176
- @include menu-color-set(
177
- 'standard',
178
- var(--md-sys-color-surface-container-low),
179
- var(--md-sys-color-on-surface-variant),
180
- var(--md-sys-color-on-surface),
181
- var(--md-sys-color-on-surface-variant),
182
- var(--md-sys-color-tertiary-container),
183
- var(--md-sys-color-on-tertiary-container)
184
- );
169
+ --_menu-item-bg: var(--md-sys-color-surface-container-low);
170
+ --_menu-on: var(--md-sys-color-on-surface-variant);
171
+ --_menu-on-strong: var(--md-sys-color-on-surface);
172
+ --_menu-icon-active: var(--md-sys-color-on-surface-variant);
173
+ --_menu-selected-bg: var(--md-sys-color-tertiary-container);
174
+ --_menu-on-selected: var(--md-sys-color-on-tertiary-container);
175
+ --_menu-do: var(--md-sys-state-disabled-state-layer-opacity, 38%);
176
+
177
+ @include menu-color-set('standard');
185
178
 
186
179
  .micl-menu__section {
187
180
  @include typography.label-small;
@@ -206,7 +199,6 @@ $item-classes: ':is(.micl-list-item-one, .micl-list-item-two, .micl-list-item-th
206
199
  }
207
200
 
208
201
  .micl-menu[popover] {
209
- display: flex;
210
202
  flex-direction: column;
211
203
  position: absolute;
212
204
  inset: unset;
@@ -221,24 +213,27 @@ $item-classes: ':is(.micl-list-item-one, .micl-list-item-two, .micl-list-item-th
221
213
  border: none;
222
214
  outline: none;
223
215
  background-color: transparent;
216
+ --micl-duration: var(--md-comp-menu-motion-spatial-duration-reverse);
217
+ --micl-easing: linear;
218
+ --_group-shape: var(--md-comp-menu-group-shape, var(--md-sys-shape-corner-small, 8px));
219
+
224
220
  opacity: 0;
225
221
  overflow: visible;
226
222
  transform: scaleY(0);
227
223
  transform-origin: center top;
228
224
  transition:
229
- opacity var(--md-comp-menu-motion-spatial-duration-reverse) linear,
230
- transform var(--md-comp-menu-motion-spatial-duration-reverse) var(--md-comp-menu-motion-spatial),
231
- overlay var(--md-comp-menu-motion-spatial-duration-reverse) linear allow-discrete,
232
- display var(--md-comp-menu-motion-spatial-duration-reverse) linear allow-discrete;
225
+ opacity var(--micl-duration) var(--micl-easing),
226
+ transform var(--micl-duration) var(--md-comp-menu-motion-spatial),
227
+ overlay var(--micl-duration) linear allow-discrete,
228
+ display var(--micl-duration) linear allow-discrete;
233
229
 
234
230
  &:popover-open {
231
+ --micl-duration: var(--md-comp-menu-motion-spatial-duration);
232
+ --micl-easing: #{motion.$md-sys-motion-easing-emphasized-decelerate};
233
+
234
+ display: flex;
235
235
  opacity: 1;
236
236
  transform: scaleY(1);
237
- transition:
238
- opacity var(--md-comp-menu-motion-spatial-duration) motion.$md-sys-motion-easing-emphasized-decelerate,
239
- transform var(--md-comp-menu-motion-spatial-duration) var(--md-comp-menu-motion-spatial),
240
- overlay var(--md-comp-menu-motion-spatial-duration) linear allow-discrete,
241
- display var(--md-comp-menu-motion-spatial-duration) linear allow-discrete;
242
237
 
243
238
  @starting-style {
244
239
  opacity: 0;
@@ -268,12 +263,12 @@ $item-classes: ':is(.micl-list-item-one, .micl-list-item-two, .micl-list-item-th
268
263
  transition: border-radius var(--md-comp-menu-motion-effects-duration-reverse) linear;
269
264
 
270
265
  &+ .micl-list {
271
- border-start-start-radius: var(--md-comp-menu-group-shape, var(--md-sys-shape-corner-small, 8px));
272
- border-start-end-radius: var(--md-comp-menu-group-shape, var(--md-sys-shape-corner-small, 8px));
266
+ border-start-start-radius: var(--_group-shape);
267
+ border-start-end-radius: var(--_group-shape);
273
268
  }
274
269
  &:has(+ .micl-list) {
275
- border-end-start-radius: var(--md-comp-menu-group-shape, var(--md-sys-shape-corner-small, 8px));
276
- border-end-end-radius: var(--md-comp-menu-group-shape, var(--md-sys-shape-corner-small, 8px));
270
+ border-end-start-radius: var(--_group-shape);
271
+ border-end-end-radius: var(--_group-shape);
277
272
  }
278
273
 
279
274
  #{$item-classes} > .micl-menu[popover] {
@@ -296,20 +291,19 @@ $item-classes: ':is(.micl-list-item-one, .micl-list-item-two, .micl-list-item-th
296
291
  }
297
292
 
298
293
  &.micl-menu--vibrant > .micl-list {
299
- @include menu-color-set(
300
- 'vibrant',
301
- var(--md-sys-color-tertiary-container),
302
- var(--md-sys-color-on-tertiary-container),
303
- var(--md-sys-color-on-tertiary-container),
304
- var(--md-sys-color-tertiary),
305
- var(--md-sys-color-tertiary),
306
- var(--md-sys-color-on-tertiary)
307
- );
294
+ --_menu-item-bg: var(--md-sys-color-tertiary-container);
295
+ --_menu-on: var(--md-sys-color-on-tertiary-container);
296
+ --_menu-on-strong: var(--md-sys-color-on-tertiary-container);
297
+ --_menu-icon-active: var(--md-sys-color-tertiary);
298
+ --_menu-selected-bg: var(--md-sys-color-tertiary);
299
+ --_menu-on-selected: var(--md-sys-color-on-tertiary);
300
+
301
+ @include menu-color-set('vibrant');
308
302
 
309
303
  background-color: var(--md-comp-menu-vibrant-container-color, var(--md-sys-color-tertiary-container));
310
304
  }
311
305
  }
312
306
 
313
- [dir=rtl] .micl-menu[popover] > .micl-list button[popovertarget] .micl-list-item__icon {
307
+ .micl-menu[popover] > .micl-list button[popovertarget] .micl-list-item__icon:dir(rtl) {
314
308
  transform: rotate(180deg);
315
309
  }
@@ -0,0 +1,108 @@
1
+ # Navigation bar
2
+ This component implements the [Material Design 3 Expressive Navigation bar](https://m3.material.io/components/navigation-bar/overview) design. A navigation bar lets people switch between UI views on smaller devices, anchored to the bottom of the screen.
3
+
4
+ ## Basic Usage
5
+
6
+ ### HTML
7
+ To create a navigation bar, use a `<nav>` element with the `micl-navigationbar` class. Inside, use anchor elements `<a>` to create the selectable navigation items. The markup mirrors the Navigation rail component.
8
+
9
+ ```HTML
10
+ <nav id="mynavigationbar" class="micl-navigationbar">
11
+ <div class="micl-navigationbar__content" role="menu">
12
+ <a href="#" class="micl-navigationbar__item" role="menuitem" aria-current="page">
13
+ <span class="micl-navigationbar__icon material-symbols-outlined" aria-hidden="true">inbox</span>
14
+ <span class="micl-navigationbar__text">Inbox</span>
15
+ </a>
16
+ <a href="#" class="micl-navigationbar__item" role="menuitem">
17
+ <span class="micl-navigationbar__icon material-symbols-outlined" aria-hidden="true">outbox</span>
18
+ <span class="micl-navigationbar__text">Outbox</span>
19
+ </a>
20
+ </div>
21
+ </nav>
22
+ ```
23
+
24
+ Use three to five items. The navigation bar is fixed to the bottom of the screen (respecting any safe-area inset), and the component automatically reserves matching space at the bottom of the page so that the content is not obscured.
25
+
26
+ > [!WARNING]
27
+ > The navigation bar component adds a `padding-block-end` CSS rule to the `<body>` element to reserve space for the bar. It matches the height of the displayed variant (including any safe-area inset) and is removed while an adaptive navigation bar is displayed as a navigation rail. Overriding this rule may cause page content to be obscured by the bar.
28
+
29
+ ### CSS
30
+ Import the navigation bar styles into your project:
31
+
32
+ ```CSS
33
+ @use "material-inspired-component-library/dist/navigationbar";
34
+ ```
35
+
36
+ Or import all MICL styles:
37
+ ```CSS
38
+ @use "material-inspired-component-library/styles";
39
+ ```
40
+
41
+ ### JavaScript
42
+ No custom JavaScript is required for the core functionality of this component.
43
+
44
+ ### Live Demo
45
+ A live example of the [Navigation bar component](https://henkpb.github.io/micl/navigationbar.html) is available to interact with.
46
+
47
+ ## Variants
48
+
49
+ ### Tall navigation bar
50
+ The **tall** navigation bar is 80px high instead of 64px, with the items vertically centered.
51
+
52
+ ```HTML
53
+ <nav class="micl-navigationbar micl-navigationbar--tall">
54
+ ...
55
+ </nav>
56
+ ```
57
+
58
+ ### Horizontal items
59
+ On wider compact devices (for example phones in landscape), the items can show the icon and label side by side in a single 40px-high pill.
60
+
61
+ ```HTML
62
+ <nav class="micl-navigationbar micl-navigationbar--horizontal">
63
+ ...
64
+ </nav>
65
+ ```
66
+
67
+ ### Adaptive navigation
68
+ An **adaptive** navigation bar acts as a navigation bar on narrow screens and is displayed as a permanently visible, collapsed [Navigation rail](../navigationrail/README.md) on wide screens. Add one of the following modifier classes:
69
+
70
+ | Class | Navigation bar below | Navigation rail from |
71
+ | ----- | -------------------- | -------------------- |
72
+ | `micl-navigationbar--bar-to-medium` | `600px` | `600px` |
73
+ | `micl-navigationbar--bar-to-expanded` | `840px` | `840px` |
74
+
75
+ ```HTML
76
+ <nav class="micl-navigationbar micl-navigationbar--bar-to-medium">
77
+ ...
78
+ </nav>
79
+ ```
80
+
81
+ Place the `<nav>` element before the main content, where a standard navigation rail would go, so that it occupies its usual position when the wide-screen layout applies. On wide screens the component is themed by the `--md-comp-nav-rail-*` custom properties of the Navigation rail component. Do not combine the adaptive classes with the `micl-navigationbar--tall` or `micl-navigationbar--horizontal` variants.
82
+
83
+ ## Theming
84
+ Each navigation bar can be themed with CSS custom properties that follow the Material Design 3 component-token naming convention.
85
+
86
+ | Custom property | Meaning | Default |
87
+ |---|---|---|
88
+ | `--md-comp-nav-bar-container-color` | The background color of the navigation bar | `--md-sys-color-surface-container` |
89
+ | `--md-comp-nav-bar-container-elevation` | The shadow (elevation) of the navigation bar | `--md-sys-elevation-level2` |
90
+ | `--md-comp-nav-bar-container-height` | The height of the navigation bar (excluding any safe-area inset) | `64px` |
91
+ | `--md-comp-nav-bar-tall-container-height` | The height of the tall navigation bar | `80px` |
92
+ | `--md-comp-nav-bar-container-shape` | The corner rounding of the navigation bar | `0px` |
93
+ | `--md-comp-nav-bar-item-icon-size` | The size of the item icons | `--md-sys-icon-size` |
94
+ | `--md-comp-nav-bar-item-active-indicator-shape` | The corner rounding of an item's active indicator | half the indicator height |
95
+ | `--md-comp-nav-bar-item-active-indicator-icon-label-space` | The space between the icon and the label | `4px` |
96
+ | `--md-comp-nav-bar-item-vertical-active-indicator-width` | The width of an item's active indicator | `56px` |
97
+ | `--md-comp-nav-bar-item-vertical-active-indicator-height` | The height of an item's active indicator | `32px` |
98
+ | `--md-comp-nav-bar-item-horizontal-active-indicator-height` | The height of an item's active indicator with horizontal items | `40px` |
99
+ | `--md-comp-nav-bar-item-horizontal-active-indicator-leading-space` | The space between the start edge of a horizontal item's active indicator and the icon | `16px` |
100
+ | `--md-comp-nav-bar-item-horizontal-active-indicator-trailing-space` | The space between the label and the end edge of a horizontal item's active indicator | `16px` |
101
+
102
+ **Example: Changing the background color of the navigation bar**
103
+
104
+ ```HTML
105
+ <nav class="micl-navigationbar" style="--md-comp-nav-bar-container-color:var(--md-sys-color-surface)">
106
+ ...
107
+ </nav>
108
+ ```
@@ -0,0 +1,185 @@
1
+ //
2
+ // Copyright © 2025 Hermana AS
3
+ //
4
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ // of this software and associated documentation files (the "Software"), to deal
6
+ // in the Software without restriction, including without limitation the rights
7
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ // copies of the Software, and to permit persons to whom the Software is
9
+ // furnished to do so, subject to the following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included in all
12
+ // copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ // SOFTWARE.
21
+
22
+ @use '../../foundations/layout';
23
+ @use '../../styles/elevation';
24
+ @use '../../styles/statelayer';
25
+ @use '../navigationrail/navitem';
26
+
27
+ @include elevation.level(0);
28
+ @include elevation.level(2);
29
+
30
+ @include statelayer.token('hover-state-layer-opacity');
31
+ @include statelayer.token('focus-state-layer-opacity');
32
+ @include statelayer.token('pressed-state-layer-opacity');
33
+ @include statelayer.token('ripple-opacity-factor');
34
+ @include statelayer.token('ripple-duration');
35
+ @include statelayer.property;
36
+ @include statelayer.keyframes;
37
+
38
+ nav.micl-navigationbar {
39
+ box-sizing: border-box;
40
+ position: fixed;
41
+ inset-block: auto 0;
42
+ inset-inline: 0;
43
+ padding-block-end: env(safe-area-inset-bottom);
44
+ background-color: var(--md-comp-nav-bar-container-color, var(--md-sys-color-surface-container));
45
+ box-shadow: var(--md-comp-nav-bar-container-elevation, var(--md-sys-elevation-level2));
46
+ border-radius: var(--md-comp-nav-bar-container-shape, 0px);
47
+ z-index: 9;
48
+
49
+ &> .micl-navigationbar__content {
50
+ box-sizing: border-box;
51
+ display: flex;
52
+ align-items: flex-start;
53
+ justify-content: space-evenly;
54
+ block-size: var(--md-comp-nav-bar-container-height, 64px);
55
+ padding-block-start: 6px;
56
+
57
+ &> a.micl-navigationbar__item {
58
+ @extend %micl-navitem;
59
+
60
+ flex-direction: column;
61
+ inline-size: var(--md-comp-nav-bar-item-vertical-active-indicator-width, 56px);
62
+ block-size: var(--md-comp-nav-bar-item-vertical-active-indicator-height, 32px);
63
+ border-radius: var(--md-comp-nav-bar-item-active-indicator-shape, calc(var(--md-comp-nav-bar-item-vertical-active-indicator-height, 32px) / 2));
64
+
65
+ .micl-navigationbar__icon {
66
+ @extend %micl-navitem-icon;
67
+ font-size: var(--md-comp-nav-bar-item-icon-size, var(--md-sys-icon-size));
68
+ inline-size: var(--md-comp-nav-bar-item-icon-size, var(--md-sys-icon-size));
69
+ padding-inline: 16px;
70
+ }
71
+ .micl-navigationbar__text {
72
+ @extend %micl-navitem-text;
73
+ margin-block-start: var(--md-comp-nav-bar-item-active-indicator-icon-label-space, 4px);
74
+ white-space: nowrap;
75
+ text-overflow: ellipsis;
76
+ }
77
+ }
78
+
79
+ &> a.micl-navigationbar__item[aria-current="page"] {
80
+ @extend %micl-navitem-current;
81
+
82
+ .micl-navigationbar__icon {
83
+ @extend %micl-navitem-current-icon;
84
+ }
85
+ .micl-navigationbar__text {
86
+ @extend %micl-navitem-current-text;
87
+ }
88
+ }
89
+ }
90
+
91
+ // Tall bar (80px): the item stack is vertically centered
92
+ &.micl-navigationbar--tall > .micl-navigationbar__content {
93
+ block-size: var(--md-comp-nav-bar-tall-container-height, 80px);
94
+ padding-block-start: 14px;
95
+ }
96
+
97
+ // Horizontal items: icon and label side by side in a 40px pill
98
+ &.micl-navigationbar--horizontal > .micl-navigationbar__content {
99
+ align-items: center;
100
+ padding-block-start: 0;
101
+
102
+ &> a.micl-navigationbar__item {
103
+ flex-direction: row;
104
+ inline-size: fit-content;
105
+ max-inline-size: 100%;
106
+ block-size: var(--md-comp-nav-bar-item-horizontal-active-indicator-height, 40px);
107
+ border-radius: var(--md-comp-nav-bar-item-active-indicator-shape, calc(var(--md-comp-nav-bar-item-horizontal-active-indicator-height, 40px) / 2));
108
+
109
+ .micl-navigationbar__icon {
110
+ padding-inline:
111
+ var(--md-comp-nav-bar-item-horizontal-active-indicator-leading-space, 16px)
112
+ var(--md-comp-nav-bar-item-active-indicator-icon-label-space, 4px);
113
+ }
114
+ .micl-navigationbar__text {
115
+ margin-block-start: 0;
116
+ padding-inline-end: var(--md-comp-nav-bar-item-horizontal-active-indicator-trailing-space, 16px);
117
+ }
118
+ }
119
+ }
120
+ }
121
+
122
+ // Reserve space at the bottom of the page for the fixed navigation bar
123
+ // (higher specificity than the padding shorthand of body.micl-window)
124
+ body:has(nav.micl-navigationbar) {
125
+ padding-block-end: calc(var(--md-comp-nav-bar-container-height, 64px) + env(safe-area-inset-bottom));
126
+ }
127
+ body:has(nav.micl-navigationbar--tall) {
128
+ padding-block-end: calc(var(--md-comp-nav-bar-tall-container-height, 80px) + env(safe-area-inset-bottom));
129
+ }
130
+
131
+ // Adaptive navigation: a navigation bar below the named breakpoint and a
132
+ // collapsed navigation rail (using the nav-rail tokens) at the breakpoint
133
+ // and above. The item anatomy is shared, so only the container changes.
134
+ $_breakpoints: (
135
+ medium: layout.$md-sys-breakpoint-medium-min,
136
+ expanded: layout.$md-sys-breakpoint-expanded-min,
137
+ );
138
+
139
+ @each $name, $min in $_breakpoints {
140
+ @media (min-width: $min) {
141
+ nav.micl-navigationbar--bar-to-#{$name} {
142
+ display: flex;
143
+ flex-direction: column;
144
+ position: sticky;
145
+ float: inline-start;
146
+ inset: unset;
147
+ inset-block-start: 0;
148
+ inline-size: var(--md-comp-nav-rail-collapsed-container-width, 96px);
149
+ block-size: 100vh;
150
+ min-block-size: 100%;
151
+ margin-inline: calc(-1 * var(--md-sys-layout-window-margin, 0px)) auto;
152
+ padding-block: var(--md-comp-nav-rail-collapsed-top-space, 44px) 0;
153
+ background-color: var(--md-comp-nav-rail-collapsed-container-color, var(--md-sys-color-surface));
154
+ box-shadow: var(--md-comp-nav-rail-collapsed-container-elevation, var(--md-sys-elevation-level0));
155
+ border-radius: var(--md-comp-nav-rail-collapsed-container-shape, 0px);
156
+ border-inline-end: var(--md-comp-nav-rail-divider-thickness, 0px) solid var(--md-comp-nav-rail-divider-color, var(--md-comp-divider-color));
157
+ overflow: hidden;
158
+
159
+ &> .micl-navigationbar__content {
160
+ flex: 1 1 auto;
161
+ flex-direction: column;
162
+ justify-content: flex-start;
163
+ inline-size: 100%;
164
+ block-size: auto;
165
+ row-gap: var(--md-comp-nav-rail-item-container-vertical-space, 6px);
166
+ padding-block: var(--md-comp-nav-rail-item-header-space-minimum, 40px) 16px;
167
+ padding-inline: 20px;
168
+ overflow: hidden auto;
169
+
170
+ &> a.micl-navigationbar__item {
171
+ margin-block-end: 40px;
172
+ row-gap: var(--md-comp-nav-rail-collapsed-item-vertical-space, 4px);
173
+ }
174
+ }
175
+ }
176
+
177
+ // in rail mode the bottom of the page no longer needs to be reserved
178
+ body.micl-window:has(nav.micl-navigationbar--bar-to-#{$name}) {
179
+ padding-block-end: var(--md-sys-layout-window-margin, 0px);
180
+ }
181
+ body:not(.micl-window):has(nav.micl-navigationbar--bar-to-#{$name}) {
182
+ padding-block-end: 0;
183
+ }
184
+ }
185
+ }
@@ -25,6 +25,7 @@ To create a simple navigation rail, use a `<nav>` element with the `micl-navigat
25
25
  Import the navigation rail styles into your project:
26
26
 
27
27
  ```CSS
28
+ @use "material-inspired-component-library/dist/iconbutton";
28
29
  @use "material-inspired-component-library/dist/navigationrail";
29
30
  ```
30
31
 
@@ -101,47 +102,70 @@ A **modal** navigation rail is hidden until the user clicks a menu button. When
101
102
 
102
103
  The button inside the navigation rail is used to hide the navigation rail, while the button outside is responsible for opening it.
103
104
 
104
- ## Customizations
105
- You can customize the appearance of the Navigation rail component by overriding its global CSS variables. These variables are declared on the `:root` pseudo-class and can be changed on any appropriate parent element to affect its child navigation rails.
105
+ ### Adaptive navigation rail
106
106
 
107
- | Variable name | Default Value | Description |
108
- | ------------- | ------------- | ----------- |
109
- | --md-comp-nav-rail-divider-thickness | 0px | The width of the vertical divider at the end of the rail |
110
- | --md-comp-nav-rail-divider-color | | The color of the vertical divider |
107
+ An **adaptive** navigation rail is permanently visible as a standard (expanded) navigation rail on wide screens, and acts as a modal navigation rail on narrow screens. Add one of the following modifier classes to a modal navigation rail:
111
108
 
112
- The Navigation rail component supports the following CSS variables, as defined in the [Material Design 3 Expressive Navigation rail Specification](https://m3.material.io/components/navigation-rail/specs):
109
+ | Class | Modal below | Standard from |
110
+ | ----- | ----------- | ------------- |
111
+ | `micl-navigationrail--modal-to-medium` | `600px` | `600px` |
112
+ | `micl-navigationrail--modal-to-expanded` | `840px` | `840px` |
113
+ | `micl-navigationrail--modal-to-large` | `1200px` | `1200px` |
114
+ | `micl-navigationrail--modal-to-extralarge` | `1600px` | `1600px` |
115
+
116
+ ```HTML
117
+ <dialog id="mynavigationrail" class="micl-navigationrail micl-navigationrail--modal-to-expanded" closedby="closerequest">
118
+ ...
119
+ </dialog>
120
+ ```
121
+
122
+ Place the `<dialog>` element where a standard `<nav>` navigation rail would go, so that it occupies its usual position when the wide-screen layout applies. The open and close buttons only serve the modal behaviour, so hide them on wide screens, for example:
113
123
 
114
124
  ```CSS
115
- --md-comp-nav-rail-item-icon-size
116
- --md-comp-nav-rail-item-active-indicator-leading-space
117
- --md-comp-nav-rail-item-active-indicator-icon-label-space
118
- --md-comp-nav-rail-item-active-indicator-trailing-space
119
- --md-comp-nav-rail-item-container-height
120
- --md-comp-nav-rail-item-short-container-height
121
- --md-comp-nav-rail-item-container-shape
122
- --md-comp-nav-rail-item-container-vertical-space
123
- --md-comp-nav-rail-item-header-space-minimum
124
- --md-comp-nav-rail-collapsed-container-width
125
- --md-comp-nav-rail-collapsed-narrow-container-width
126
- --md-comp-nav-rail-collapsed-container-elevation
127
- --md-comp-nav-rail-collapsed-container-shape
128
- --md-comp-nav-rail-collapsed-container-color
129
- --md-comp-nav-rail-collapsed-item-vertical-space
130
- --md-comp-nav-rail-collapsed-top-space
131
- --md-comp-nav-rail-expanded-container-width-minimum
132
- --md-comp-nav-rail-expanded-container-width-maximum
133
- --md-comp-nav-rail-expanded-top-space
134
- --md-comp-nav-rail-expanded-container-elevation
135
- --md-comp-nav-rail-expanded-modal-container-elevation
136
- --md-comp-nav-rail-expanded-container-color
137
- --md-comp-nav-rail-expanded-modal-container-color
138
- --md-comp-nav-rail-expanded-container-shape
139
- --md-comp-nav-rail-expanded-modal-container-shape
140
- --md-comp-nav-rail-item-vertical-active-indicator-height
141
- --md-comp-nav-rail-item-vertical-active-indicator-width
142
- --md-comp-nav-rail-item-horizontal-full-width-leading-space
125
+ @media (min-width: 840px) {
126
+ [commandfor="mynavigationrail"] {
127
+ display: none;
128
+ }
129
+ }
143
130
  ```
144
131
 
132
+ > [!NOTE]
133
+ > If the modal navigation rail is open while the window is resized across the breakpoint, it remains modal until dismissed, after which it becomes the permanently visible standard rail.
134
+
135
+ ## Theming
136
+ Each navigation rail can be themed with CSS custom properties that follow the Material Design 3 component-token naming convention.
137
+
138
+ | Custom property | Meaning | Default |
139
+ |---|---|---|
140
+ | `--md-comp-nav-rail-divider-thickness` | The width of the vertical divider at the end of the rail | `0px` |
141
+ | `--md-comp-nav-rail-divider-color` | The color of the vertical divider | `--md-comp-divider-color` |
142
+ | `--md-comp-nav-rail-collapsed-container-width` | The width of the collapsed navigation rail | `96px` |
143
+ | `--md-comp-nav-rail-collapsed-container-color` | The background color of the collapsed navigation rail | `--md-sys-color-surface` |
144
+ | `--md-comp-nav-rail-collapsed-container-elevation` | The shadow (elevation) of the collapsed navigation rail | `--md-sys-elevation-level0` |
145
+ | `--md-comp-nav-rail-collapsed-container-shape` | The corner rounding of the collapsed navigation rail | `0px` |
146
+ | `--md-comp-nav-rail-collapsed-top-space` | The space between the top edge and the header of the collapsed navigation rail | `44px` |
147
+ | `--md-comp-nav-rail-collapsed-item-vertical-space` | The space between the icon and the label of a collapsed item | `4px` |
148
+ | `--md-comp-nav-rail-expanded-container-width-minimum` | The smallest allowed width of the expanded navigation rail | `220px` |
149
+ | `--md-comp-nav-rail-expanded-container-width-maximum` | The largest allowed width of the expanded navigation rail | `360px` |
150
+ | `--md-comp-nav-rail-expanded-container-color` | The background color of the expanded navigation rail | `--md-sys-color-surface` |
151
+ | `--md-comp-nav-rail-expanded-container-elevation` | The shadow (elevation) of the expanded navigation rail | `--md-sys-elevation-level0` |
152
+ | `--md-comp-nav-rail-expanded-container-shape` | The corner rounding of the expanded navigation rail | `0px` |
153
+ | `--md-comp-nav-rail-expanded-top-space` | The space between the top edge and the header of the expanded navigation rail | `44px` |
154
+ | `--md-comp-nav-rail-expanded-modal-container-color` | The background color of the modal navigation rail | `--md-sys-color-surface-container` |
155
+ | `--md-comp-nav-rail-expanded-modal-container-elevation` | The shadow (elevation) of the modal navigation rail | `--md-sys-elevation-level2` |
156
+ | `--md-comp-nav-rail-expanded-modal-container-shape` | The corner rounding of the modal navigation rail, applied to the two corners facing the content | `--md-sys-shape-corner-large` |
157
+ | `--md-comp-nav-rail-item-icon-size` | The size of the item icons | `--md-sys-icon-size` |
158
+ | `--md-comp-nav-rail-item-container-shape` | The corner rounding of an item's active indicator | half the item height |
159
+ | `--md-comp-nav-rail-item-container-vertical-space` | The vertical space between items | `6px` |
160
+ | `--md-comp-nav-rail-item-header-space-minimum` | The minimum space between the header and the first item | `40px` |
161
+ | `--md-comp-nav-rail-item-short-container-height` | The height of items in an expanded navigation rail, and of items without a label | `56px` |
162
+ | `--md-comp-nav-rail-item-vertical-active-indicator-width` | The width of an item's active indicator in a collapsed navigation rail | `56px` |
163
+ | `--md-comp-nav-rail-item-vertical-active-indicator-height` | The height of an item's active indicator in a collapsed navigation rail | `32px` |
164
+ | `--md-comp-nav-rail-item-active-indicator-leading-space` | The space between the start edge of the active indicator and the icon | `16px` |
165
+ | `--md-comp-nav-rail-item-active-indicator-trailing-space` | The space between the icon and the end edge of the active indicator | `16px` |
166
+ | `--md-comp-nav-rail-item-active-indicator-icon-label-space` | The space between the icon and the label of an expanded item | `8px` |
167
+ | `--md-comp-nav-rail-item-horizontal-full-width-trailing-space` | The space between the end of an expanded item's click target and the container edge | `16px` |
168
+
145
169
  **Example: Changing the width of the collapsed navigation rail**
146
170
 
147
171
  ```HTML
@@ -152,7 +176,7 @@ The Navigation rail component supports the following CSS variables, as defined i
152
176
  </div>
153
177
  ```
154
178
 
155
- To add a vertical divider of the to the navigation rail, set the following CSS variable:
179
+ To add a vertical divider to the navigation rail, set the following CSS variable:
156
180
 
157
181
  ```CSS
158
182
  #mynavigationrail {