material-inspired-component-library 8.1.1 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +106 -18
- package/components/README.md +1 -1
- package/components/accordion/README.md +6 -6
- package/components/alert/README.md +10 -10
- package/components/alert/index.scss +27 -52
- package/components/appbar/README.md +19 -6
- package/components/appbar/index.scss +40 -44
- package/components/badge/README.md +12 -10
- package/components/badge/index.scss +21 -25
- package/components/bottomsheet/README.md +26 -1
- package/components/bottomsheet/index.scss +58 -44
- package/components/button/README.md +7 -5
- package/components/button/_shared.scss +210 -0
- package/components/button/index.scss +49 -283
- package/components/card/README.md +97 -85
- package/components/card/index.scss +46 -65
- package/components/checkbox/README.md +25 -14
- package/{tools/shapes/check.mjs → components/checkbox/_label.scss} +37 -42
- package/components/checkbox/index.scss +66 -66
- package/components/chip/README.md +186 -0
- package/components/chip/index.scss +285 -0
- package/components/datepicker/README.md +79 -0
- package/components/datepicker/index.scss +346 -315
- package/components/dialog/README.md +20 -10
- package/components/dialog/index.scss +55 -66
- package/components/divider/README.md +16 -15
- package/components/divider/index.scss +9 -25
- package/components/iconbutton/README.md +8 -3
- package/components/iconbutton/index.scss +83 -186
- package/components/list/README.md +89 -156
- package/components/list/index.scss +34 -36
- package/components/menu/README.md +81 -155
- package/components/menu/index.scss +52 -58
- package/components/navigationbar/README.md +108 -0
- package/components/navigationbar/index.scss +185 -0
- package/components/navigationrail/README.md +60 -36
- package/components/navigationrail/_navitem.scss +96 -0
- package/components/navigationrail/index.scss +76 -130
- package/components/progressindicator/README.md +83 -47
- package/components/progressindicator/index.scss +622 -172
- package/components/radio/README.md +11 -9
- package/components/radio/index.scss +36 -33
- package/components/select/README.md +12 -7
- package/components/select/index.scss +26 -34
- package/components/shapes/README.md +3 -3
- package/components/shapes/index.scss +0 -1
- package/components/sidesheet/README.md +21 -9
- package/components/sidesheet/index.scss +38 -46
- package/components/slider/README.md +21 -0
- package/components/slider/index.scss +108 -139
- package/components/snackbar/README.md +32 -35
- package/components/snackbar/index.scss +10 -22
- package/components/stepper/README.md +14 -7
- package/components/stepper/index.scss +58 -39
- package/components/switch/README.md +22 -15
- package/components/switch/index.scss +68 -60
- package/components/textfield/README.md +48 -5
- package/components/textfield/index.scss +193 -248
- package/components/timepicker/README.md +53 -23
- package/components/timepicker/index.scss +110 -128
- package/dist/alert.css +1 -1
- package/dist/alert.js +1 -1
- package/dist/appbar.css +1 -1
- package/dist/appbar.js +1 -1
- package/dist/badge.css +1 -1
- package/dist/badge.js +1 -1
- package/dist/base.css +1 -0
- package/dist/base.js +1 -0
- package/dist/bottomsheet.css +1 -1
- package/dist/bottomsheet.js +1 -1
- package/dist/button.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.css +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chip.css +1 -0
- package/dist/chip.js +1 -0
- package/dist/components/iconbutton/index.d.ts +2 -7
- package/dist/components/slider/index.d.ts +1 -1
- package/dist/components/textfield/index.d.ts +2 -2
- package/dist/datepicker.css +1 -1
- package/dist/datepicker.js +1 -1
- package/dist/dialog.css +1 -1
- package/dist/dialog.js +1 -1
- package/dist/divider.css +1 -1
- package/dist/divider.js +1 -1
- package/dist/field.css +1 -0
- package/dist/field.js +1 -0
- package/dist/foundations/form/index.js +1 -1
- package/dist/foundations/runtime.d.ts +15 -0
- package/dist/foundations/runtime.js +1 -0
- package/dist/iconbutton.css +1 -1
- package/dist/iconbutton.js +1 -1
- package/dist/layout.css +1 -1
- package/dist/layout.js +1 -1
- package/dist/list.css +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.css +1 -1
- package/dist/menu.js +1 -1
- package/dist/micl.css +1 -1
- package/dist/micl.d.ts +14 -5
- package/dist/micl.js +1 -1
- package/dist/navigationbar.css +1 -0
- package/dist/navigationbar.js +1 -0
- package/dist/navigationrail.css +1 -1
- package/dist/navigationrail.js +1 -1
- package/dist/progressindicator.css +1 -1
- package/dist/progressindicator.js +1 -1
- package/dist/radio.css +1 -1
- package/dist/radio.js +1 -1
- package/dist/scrollbar.js +1 -1
- package/dist/select.css +1 -1
- package/dist/select.js +1 -1
- package/dist/shapes.css +1 -1
- package/dist/shapes.js +1 -1
- package/dist/sidesheet.css +1 -1
- package/dist/sidesheet.js +1 -1
- package/dist/slider.css +1 -1
- package/dist/slider.js +1 -1
- package/dist/snackbar.css +1 -1
- package/dist/snackbar.js +1 -1
- package/dist/stepper.css +1 -1
- package/dist/stepper.js +1 -1
- package/dist/switch.css +1 -1
- package/dist/switch.js +1 -1
- package/dist/textfield.css +1 -1
- package/dist/textfield.js +1 -1
- package/dist/timepicker.css +1 -1
- package/dist/timepicker.js +1 -1
- package/foundations/_index.scss +35 -0
- package/foundations/{index.scss → base/index.scss} +21 -56
- package/foundations/field/index.scss +37 -0
- package/foundations/layout/index.scss +64 -65
- package/package.json +23 -9
- package/styles/statelayer.scss +20 -5
- package/styles.scss +5 -2
- package/.claude/settings.local.json +0 -17
- package/.editorconfig +0 -12
- package/.gitattributes +0 -9
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -35
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/CLAUDE.md +0 -53
- package/CODE_OF_CONDUCT.md +0 -128
- package/components/bottomsheet/index.ts +0 -153
- package/components/button/index.ts +0 -79
- package/components/checkbox/index.ts +0 -148
- package/components/datepicker/index.ts +0 -693
- package/components/iconbutton/index.ts +0 -77
- package/components/list/index.ts +0 -138
- package/components/menu/index.ts +0 -145
- package/components/navigationrail/index.ts +0 -87
- package/components/progressindicator/index.ts +0 -77
- package/components/slider/index.ts +0 -149
- package/components/snackbar/index.ts +0 -118
- package/components/stepper/index.ts +0 -248
- package/components/textfield/index.ts +0 -188
- package/components/timepicker/index.ts +0 -413
- package/dist/components/progressindicator/index.d.ts +0 -6
- package/dist/foundations.css +0 -1
- package/dist/foundations.js +0 -1
- package/docs/accordion.html +0 -344
- package/docs/alert.html +0 -177
- package/docs/bottomsheet.html +0 -240
- package/docs/button.html +0 -291
- package/docs/card-awards.webp +0 -0
- package/docs/card-cabinet.webp +0 -0
- package/docs/card-city.webp +0 -0
- package/docs/card-fingerprint.webp +0 -0
- package/docs/card-holiday.webp +0 -0
- package/docs/card-names.webp +0 -0
- package/docs/card.html +0 -159
- package/docs/checkbox.html +0 -147
- package/docs/datepicker.html +0 -274
- package/docs/dialog.html +0 -195
- package/docs/divider.html +0 -139
- package/docs/docs.css +0 -26
- package/docs/docs.js +0 -139
- package/docs/iconbutton.html +0 -331
- package/docs/index.html +0 -431
- package/docs/list.html +0 -310
- package/docs/menu.html +0 -574
- package/docs/micl.css +0 -1
- package/docs/micl.js +0 -1
- package/docs/navigationrail.html +0 -138
- package/docs/progressindicator.html +0 -288
- package/docs/radio.html +0 -123
- package/docs/select.html +0 -337
- package/docs/shapes.css +0 -1
- package/docs/shapes.html +0 -159
- package/docs/shapes.js +0 -1
- package/docs/sidesheet.html +0 -149
- package/docs/slider.html +0 -141
- package/docs/snackbar.html +0 -102
- package/docs/stepper.html +0 -319
- package/docs/switch.html +0 -196
- package/docs/textfield.html +0 -208
- package/docs/themes/airblue/dark-hc.css +0 -51
- package/docs/themes/airblue/dark-mc.css +0 -51
- package/docs/themes/airblue/dark.css +0 -51
- package/docs/themes/airblue/light-hc.css +0 -51
- package/docs/themes/airblue/light-mc.css +0 -51
- package/docs/themes/airblue/light.css +0 -51
- package/docs/themes/airblue/theme.css +0 -306
- package/docs/themes/barnred/dark-hc.css +0 -51
- package/docs/themes/barnred/dark-mc.css +0 -51
- package/docs/themes/barnred/dark.css +0 -51
- package/docs/themes/barnred/light-hc.css +0 -51
- package/docs/themes/barnred/light-mc.css +0 -51
- package/docs/themes/barnred/light.css +0 -51
- package/docs/themes/barnred/theme.css +0 -306
- package/docs/themes/citrine/dark-hc.css +0 -51
- package/docs/themes/citrine/dark-mc.css +0 -51
- package/docs/themes/citrine/dark.css +0 -51
- package/docs/themes/citrine/light-hc.css +0 -51
- package/docs/themes/citrine/light-mc.css +0 -51
- package/docs/themes/citrine/light.css +0 -51
- package/docs/themes/citrine/theme.css +0 -306
- package/docs/themes/gray/dark-hc.css +0 -51
- package/docs/themes/gray/dark-mc.css +0 -51
- package/docs/themes/gray/dark.css +0 -51
- package/docs/themes/gray/light-hc.css +0 -51
- package/docs/themes/gray/light-mc.css +0 -51
- package/docs/themes/gray/light.css +0 -51
- package/docs/themes/gray/theme.css +0 -306
- package/docs/themes/greenery/dark-hc.css +0 -51
- package/docs/themes/greenery/dark-mc.css +0 -51
- package/docs/themes/greenery/dark.css +0 -51
- package/docs/themes/greenery/light-hc.css +0 -51
- package/docs/themes/greenery/light-mc.css +0 -51
- package/docs/themes/greenery/light.css +0 -51
- package/docs/themes/greenery/theme.css +0 -306
- package/docs/themes/hermana/dark-hc.css +0 -51
- package/docs/themes/hermana/dark-mc.css +0 -51
- package/docs/themes/hermana/dark.css +0 -51
- package/docs/themes/hermana/light-hc.css +0 -51
- package/docs/themes/hermana/light-mc.css +0 -51
- package/docs/themes/hermana/light.css +0 -51
- package/docs/themes/hermana/theme.css +0 -306
- package/docs/themes/illuminating/dark-hc.css +0 -51
- package/docs/themes/illuminating/dark-mc.css +0 -51
- package/docs/themes/illuminating/dark.css +0 -51
- package/docs/themes/illuminating/light-hc.css +0 -51
- package/docs/themes/illuminating/light-mc.css +0 -51
- package/docs/themes/illuminating/light.css +0 -51
- package/docs/themes/illuminating/theme.css +0 -306
- package/docs/themes/magenta/dark-hc.css +0 -51
- package/docs/themes/magenta/dark-mc.css +0 -51
- package/docs/themes/magenta/dark.css +0 -51
- package/docs/themes/magenta/light-hc.css +0 -51
- package/docs/themes/magenta/light-mc.css +0 -51
- package/docs/themes/magenta/light.css +0 -51
- package/docs/themes/magenta/theme.css +0 -306
- package/docs/themes/mocha/dark-hc.css +0 -51
- package/docs/themes/mocha/dark-mc.css +0 -51
- package/docs/themes/mocha/dark.css +0 -51
- package/docs/themes/mocha/light-hc.css +0 -51
- package/docs/themes/mocha/light-mc.css +0 -51
- package/docs/themes/mocha/light.css +0 -51
- package/docs/themes/mocha/theme.css +0 -306
- package/docs/themes/olivegreen/dark-hc.css +0 -51
- package/docs/themes/olivegreen/dark-mc.css +0 -51
- package/docs/themes/olivegreen/dark.css +0 -51
- package/docs/themes/olivegreen/light-hc.css +0 -51
- package/docs/themes/olivegreen/light-mc.css +0 -51
- package/docs/themes/olivegreen/light.css +0 -51
- package/docs/themes/olivegreen/theme.css +0 -306
- package/docs/themes/peri/dark-hc.css +0 -51
- package/docs/themes/peri/dark-mc.css +0 -51
- package/docs/themes/peri/dark.css +0 -51
- package/docs/themes/peri/light-hc.css +0 -51
- package/docs/themes/peri/light-mc.css +0 -51
- package/docs/themes/peri/light.css +0 -51
- package/docs/themes/peri/theme.css +0 -306
- package/docs/timepicker.html +0 -160
- package/foundations/form/index.ts +0 -174
- package/foundations/layout/README.md +0 -127
- package/intl.d.ts +0 -9
- package/micl.ts +0 -221
- package/styles/README.md +0 -196
- package/tools/shapes/generate.mjs +0 -828
- package/tsconfig.json +0 -116
- package/webpack.config.js +0 -159
package/README.md
CHANGED
|
@@ -1,21 +1,47 @@
|
|
|
1
|
-
# Material
|
|
2
|
-
The Material-Inspired Component Library (MICL) offers a free and open-source collection of beautifully crafted components leveraging native HTML markup, designed to align with the [Material Design 3](https://m3.material.io/) guidelines. MICL prioritizes minimal HTML markup and often requires no JavaScript, making it a lightweight and efficient choice for your projects.
|
|
1
|
+
# MICL — Material Design 3 Expressive for the plain web
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- **Effortless Dark Mode:** Enjoy out-of-the-box support for both light and dark modes, automatically adapting to your defined color scheme.
|
|
3
|
+
[](https://www.npmjs.com/package/material-inspired-component-library)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+

|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
- **Heavy JavaScript Dependencies:** If your project heavily relies on a JavaScript framework for component interaction, MICL's minimalist approach might not be the best fit.
|
|
11
|
-
- **Bootstrap Preference:** Users deeply integrated with or preferring the Bootstrap CSS framework may find MICL's distinct design philosophy less suitable.
|
|
12
|
-
- **Legacy Browser Support:** MICL is designed for modern browsers, and comprehensive support for older browser versions is not a primary focus.
|
|
7
|
+
**MICL (Material-Inspired Component Library)** is a free, open-source implementation of [Material Design 3](https://m3.material.io/) — including the current **M3 Expressive** update — built from native HTML elements and modern CSS. No custom elements, no framework, no runtime dependencies, and for most components no JavaScript at all.
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
Explore the components in a live environment and see how they work.
|
|
9
|
+
**[Live showcase](https://henkpb.github.io/micl/)** · **[Component documentation](components/README.md)** · **[Quick start](#quick-start-)**
|
|
16
10
|
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
## Why MICL exists
|
|
12
|
+
|
|
13
|
+
When Google wound down [material-web](https://github.com/material-components/material-web), the web platform lost its reference implementation of Material Design 3 — and the design system's newest chapter, **M3 Expressive**, never reached the open web at all.
|
|
14
|
+
|
|
15
|
+
MICL picks up that torch with the opposite architecture. Where material-web wrapped every component in a JavaScript custom element, MICL styles the HTML you already write: a progress bar is a `<progress>`, a dialog is a `<dialog>`, a menu is a popover, a navigation rail is a `<nav>`. The heavy lifting is done by modern CSS — registered custom properties, container style queries, typed `attr()`, `clip-path: shape()`, anchor positioning — so components render on first paint, keep their native semantics and accessibility, and never fight your framework (or your decision not to use one).
|
|
16
|
+
|
|
17
|
+
## Highlights
|
|
18
|
+
|
|
19
|
+
- **The M3 Expressive catalogue, on the web first.** 29 components, the Material shape library, adaptive pane layouts — and the signature Expressive details, like wavy progress indicators drawn and animated entirely in CSS, with the wave motion running on the compositor.
|
|
20
|
+
- **Native HTML first.** Components are your own markup plus a class. Forms post, dialogs trap focus, `<progress>` announces progress — because the platform does it, not a re-implementation.
|
|
21
|
+
- **(Almost) no JavaScript.** Most components need none. All interactive behaviour for the entire library fits in one dependency-free ~11 kB minified and gzipped file — or import per-component slices and let your bundler tree-shake the rest.
|
|
22
|
+
- **Theming per the spec.** Ready-made colour themes with light, dark and high-contrast variants, and every component themable through spec-named `--md-comp-*` custom properties.
|
|
23
|
+
- **À la carte delivery.** Full bundle or per-component CSS/JS pairs, npm or CDN ([jsDelivr](https://cdn.jsdelivr.net/npm/material-inspired-component-library/dist/micl.css)).
|
|
24
|
+
- **International by default.** Right-to-left layouts mirror automatically, and `prefers-reduced-motion` is respected throughout.
|
|
25
|
+
|
|
26
|
+
## How MICL compares
|
|
27
|
+
|
|
28
|
+
| | **MICL** | material-web | Beer CSS | MUI | Angular Material |
|
|
29
|
+
|---|---|---|---|---|---|
|
|
30
|
+
| Design spec | **M3 Expressive** | M3 | M3 | Material-influenced (M2 heritage) | M3 |
|
|
31
|
+
| Actively developed | ✅ | ❌ development wound down | ✅ | ✅ | ✅ |
|
|
32
|
+
| Framework required | none | none (Lit runtime) | none | React | Angular |
|
|
33
|
+
| Component model | native HTML + CSS | custom elements | HTML + CSS classes | React components | Angular components |
|
|
34
|
+
| Usable without JavaScript | ✅ most components | ❌ | partly | ❌ | ❌ |
|
|
35
|
+
| Runtime dependencies | **0** | Lit | 0 | several | Angular |
|
|
36
|
+
| Server-side rendering | plain HTML + CSS, nothing to hydrate | needs SSR shims | ✅ | hydration | hydration |
|
|
37
|
+
|
|
38
|
+
<sup>Comparison reflects the situation at the time of writing (July 2026); corrections welcome.</sup>
|
|
39
|
+
|
|
40
|
+
## Trade-offs — when MICL might not fit
|
|
41
|
+
|
|
42
|
+
- **Modern browsers only.** MICL leans on current CSS. Chromium-based browsers get the full experience today; Firefox degrades gracefully where a feature hasn't shipped yet (e.g. determinate progress values wait on typed `attr()`, available behind a preview-setting). Legacy browser support is a non-goal.
|
|
43
|
+
- **CSS-first philosophy.** If your team expects components as framework objects with props and events, MICL's markup-plus-classes approach will feel different — that difference is the point, but it is a real difference.
|
|
44
|
+
- **Not a Bootstrap look-alike.** MICL implements Material Design 3 faithfully rather than offering a neutral, endlessly re-skinnable base.
|
|
19
45
|
|
|
20
46
|
## Quick start 🚀
|
|
21
47
|
|
|
@@ -28,10 +54,27 @@ npm install material-inspired-component-library
|
|
|
28
54
|
|
|
29
55
|
**Sass/SCSS**
|
|
30
56
|
|
|
31
|
-
To import the styles for a single component (e.g., the [Card component](components/card/README.md)):
|
|
57
|
+
To import the styles for a single component (e.g., the [Card component](components/card/README.md)), import the shared base styles once, followed by the component:
|
|
32
58
|
```SCSS
|
|
59
|
+
@use "material-inspired-component-library/dist/base";
|
|
33
60
|
@use "material-inspired-component-library/dist/card";
|
|
34
61
|
```
|
|
62
|
+
The base file contains the foundation design tokens and the `@property` registrations required by the ripple effect. It is small, needed only once, and already included in the full `micl.css`.
|
|
63
|
+
|
|
64
|
+
Some components build on other MICL components; when importing them individually, import their companions as well (each component's README shows the complete list):
|
|
65
|
+
|
|
66
|
+
| Component | Also import |
|
|
67
|
+
| --------- | ----------- |
|
|
68
|
+
| appbar | iconbutton |
|
|
69
|
+
| datepicker | dialog, textfield, button, iconbutton, divider |
|
|
70
|
+
| dialog | button, iconbutton |
|
|
71
|
+
| menu | list |
|
|
72
|
+
| navigationrail | iconbutton |
|
|
73
|
+
| select | textfield, menu, list |
|
|
74
|
+
| sidesheet | button, iconbutton, divider |
|
|
75
|
+
| snackbar | button, iconbutton |
|
|
76
|
+
| stepper | button |
|
|
77
|
+
| timepicker | dialog, button, iconbutton |
|
|
35
78
|
|
|
36
79
|
To import all MICL styles:
|
|
37
80
|
```SCSS
|
|
@@ -51,6 +94,8 @@ Copy the main `micl.css` file to your distribution folder and include it in your
|
|
|
51
94
|
<link rel="stylesheet" type="text/css" href="path/to/dist/micl.css">
|
|
52
95
|
```
|
|
53
96
|
|
|
97
|
+
The per-component stylesheets can be included the same way; include `base.css` once before them (`<link rel="stylesheet" type="text/css" href="path/to/dist/base.css">`).
|
|
98
|
+
|
|
54
99
|
The main MICL CSS file can also be found on CDN networks, like on jsDelivr: `https://cdn.jsdelivr.net/npm/material-inspired-component-library/dist/micl.css`
|
|
55
100
|
|
|
56
101
|
### 3. Add the HTML & JavaScript
|
|
@@ -66,18 +111,31 @@ Here is a simple example of a [Card component](components/card/README.md).
|
|
|
66
111
|
</div>
|
|
67
112
|
```
|
|
68
113
|
|
|
114
|
+
And here is the Expressive circular progress indicator — note that updating `value` is all it takes; the 500 ms Material-motion transition, the size adjustments, and the track gap are all CSS:
|
|
115
|
+
|
|
116
|
+
```HTML
|
|
117
|
+
<progress class="micl-circular-progress" value="0.6"></progress>
|
|
118
|
+
```
|
|
119
|
+
|
|
69
120
|
Some components, like the [List](components/list/README.md), require a small amount of JavaScript to handle interactive behaviour. Because the JavaScript footprint in MICL is so small, you can import the code for all components at once.
|
|
70
121
|
```JavaScript
|
|
71
|
-
import
|
|
122
|
+
import "material-inspired-component-library/dist/micl";
|
|
72
123
|
```
|
|
73
124
|
This will initialize all MICL components, including those that will be added to the DOM later on.
|
|
74
125
|
|
|
126
|
+
To load only the JavaScript for the components you use, import their files individually. Each component registers itself with a shared runtime, so any combination works:
|
|
127
|
+
```JavaScript
|
|
128
|
+
import "material-inspired-component-library/dist/list";
|
|
129
|
+
import "material-inspired-component-library/dist/textfield";
|
|
130
|
+
```
|
|
131
|
+
|
|
75
132
|
**Plain JavaScript**
|
|
76
133
|
|
|
77
134
|
Copy the main `micl.js` file to your distribution folder and include it in your application:
|
|
78
135
|
```HTML
|
|
79
136
|
<script src="path/to/dist/micl.js"></script>
|
|
80
137
|
```
|
|
138
|
+
The per-component files can be included the same way (`<script src="path/to/dist/list.js"></script>`).
|
|
81
139
|
|
|
82
140
|
The main MICL JavaScript file can also be found on CDN networks, like on jsDelivr: `https://cdn.jsdelivr.net/npm/material-inspired-component-library/dist/micl.js`
|
|
83
141
|
|
|
@@ -90,9 +148,23 @@ MICL uses the [**Google Sans**](https://fonts.google.com/specimen/Google+Sans) a
|
|
|
90
148
|
|
|
91
149
|
The [Styles guide](styles/README.md) describes how to change the default font.
|
|
92
150
|
|
|
151
|
+
## Under the hood 🔬
|
|
152
|
+
|
|
153
|
+
MICL doubles as a working tour of what production CSS can do in 2026. A few of the techniques in the codebase:
|
|
154
|
+
|
|
155
|
+
- **Typed `attr()`** turns `<progress value>` and `aria-valuenow` into animatable CSS values — determinate indicators transition per the Material motion spec with zero JavaScript.
|
|
156
|
+
- **Registered `@property` custom properties** drive interpolable gradients: carved progress tracks, conic arcs, trigonometric cap positioning.
|
|
157
|
+
- **Compositor-only animation**: the Expressive wave travel is a transform over a static mask — no per-frame repaints, no matter how many indicators run.
|
|
158
|
+
- **`clip-path: shape()`** clips progress rings to geometrically antialiased annuli, with a gradient-mask fallback.
|
|
159
|
+
- **Container style queries** switch components at exact computed states (a wave collapsing to a mathematically flat bar at 100 %).
|
|
160
|
+
- **Anchor positioning** places menus and submenus without measurement code.
|
|
161
|
+
|
|
162
|
+
Each component's README documents its approach and its graceful-degradation story.
|
|
163
|
+
|
|
93
164
|
## Foundations 🪟
|
|
94
|
-
|
|
165
|
+
Separate CSS files, based on the [Material Design Layout Foundation](https://m3.material.io/foundations/layout/layout-overview), provide foundational styles that are not tied to a single component. The **Layout** foundation includes styles for the **window frame**, **rail region** and **panes** that adapt to the available screen space, ensuring your layout follows Material Design's adaptive design guidelines. The **Field** foundation arranges form fields in a grid with the standard Material vertical rhythm, optionally led by an icon column.
|
|
95
166
|
|
|
167
|
+
- [x] [Field](foundations/field/README.md)
|
|
96
168
|
- [x] [Layout](foundations/layout/README.md)
|
|
97
169
|
|
|
98
170
|
## Available components ✅
|
|
@@ -105,13 +177,17 @@ The library currently consists of the following components:
|
|
|
105
177
|
- [x] [Button](components/button/README.md)
|
|
106
178
|
- [x] [Card](components/card/README.md)
|
|
107
179
|
- [x] [Checkbox](components/checkbox/README.md)
|
|
180
|
+
- [x] [Chip](components/chip/README.md)
|
|
108
181
|
- [x] [Date picker](components/datepicker/README.md)
|
|
182
|
+
- [x] [Date range picker](components/datepicker/README.md)
|
|
109
183
|
- [x] [Dialog](components/dialog/README.md)
|
|
110
184
|
- [x] [Divider](components/divider/README.md)
|
|
111
185
|
- [x] [Icon button](components/iconbutton/README.md)
|
|
112
186
|
- [x] [List](components/list/README.md)
|
|
113
187
|
- [x] [Menu](components/menu/README.md)
|
|
188
|
+
- [x] [Navigation bar](components/navigationbar/README.md)
|
|
114
189
|
- [x] [Navigation rail](components/navigationrail/README.md)
|
|
190
|
+
- [x] [Progress indicator](components/progressindicator/README.md)
|
|
115
191
|
- [x] [Radio button](components/radio/README.md)
|
|
116
192
|
- [x] [Select](components/select/README.md)
|
|
117
193
|
- [x] [Shapes](components/shapes/README.md)
|
|
@@ -125,6 +201,18 @@ The library currently consists of the following components:
|
|
|
125
201
|
|
|
126
202
|
## Change Log ↪️
|
|
127
203
|
|
|
204
|
+
### 9.0.0 (20.07.2026)
|
|
205
|
+
- **BREAKING**: Renamed all CSS custom properties from --md-sys- to --md-comp-.
|
|
206
|
+
- **BREAKING**: Renamed the layout class `micl-body` and its `micl-body--*` modifiers to `micl-panes`/`micl-panes--*`, aligning with the M3 Expressive layout terminology.
|
|
207
|
+
- **BREAKING**: Per-component CSS files no longer embed the shared foundation styles; load `dist/base.css` once before them. The full `micl.css` is unaffected.
|
|
208
|
+
- **Chip**: New component.
|
|
209
|
+
- **Progress indicator**: New component.
|
|
210
|
+
- **Navigation bar**: New component.
|
|
211
|
+
- **Navigation rail**: Support for adaptive behaviour.
|
|
212
|
+
- **Date Range picker**: Select two dates in the Date picker to return a date range.
|
|
213
|
+
- **Field**: The `micl-grid-field` and `micl-grid-iconfield` classes are now the 'Field' layout foundation with its own stylesheet (`dist/field.css`).
|
|
214
|
+
- **Layout**: The window now reserves the safety regions (`env(safe-area-inset-*)`) around the content, and sticky app bars and navigation rails stay below the top safety region.
|
|
215
|
+
|
|
128
216
|
### 8.1.0 (24.06.2026)
|
|
129
217
|
- **Shapes**: The Material shape library supported as the 'Shapes' component.
|
|
130
218
|
|
|
@@ -148,7 +236,7 @@ The library currently consists of the following components:
|
|
|
148
236
|
- **Time picker**: New component.
|
|
149
237
|
|
|
150
238
|
### 4.0.0 (27.10.2025)
|
|
151
|
-
- **BREAKING**: Moved layout.scss to
|
|
239
|
+
- **BREAKING**: Moved layout.scss to subfolder.
|
|
152
240
|
- **Alert**: New component.
|
|
153
241
|
- **Stepper**: New component.
|
|
154
242
|
|
package/components/README.md
CHANGED
|
@@ -11,4 +11,4 @@ Each component is self-contained in a separate folder, making it easy to find wh
|
|
|
11
11
|
|
|
12
12
|
Most components are standalone, but some are built on top of others. For example, the [Menu component](./menu/README.md) extends the [List component](./list/README.md), so it requires the styles and functionality of both. Always check the documentation for each component to see which dependencies you need to import. This ensures everything works as expected.
|
|
13
13
|
|
|
14
|
-
A [separate CSS file](../foundations/layout/README.md), based on the [Material Design Layout Foundation](https://m3.material.io/foundations/layout/
|
|
14
|
+
A [separate CSS file](../foundations/layout/README.md), based on the [Material Design Layout Foundation](https://m3.material.io/foundations/layout/layout-overview), provides styles for an adaptive layout. It includes styles for the **window frame**, **rail region** and **panes** that adapt to the available screen space, ensuring your layout follows Material Design's adaptive design guidelines.
|
|
@@ -113,17 +113,17 @@ Since the Accordion is based on the List component, you can use the same utility
|
|
|
113
113
|
## Keyboard
|
|
114
114
|
Each `<summary>` is a tab stop in document order — `Tab` and `Shift+Tab` move focus through the accordion headers. While focus is on a header, `Enter` or `Space` toggles the panel open or closed. As an optional enhancement, `ArrowDown` and `ArrowUp` move focus to the next or previous header in the same group; focus wraps around at the ends.
|
|
115
115
|
|
|
116
|
-
##
|
|
117
|
-
You can customize the appearance of the Accordion component by overriding its own
|
|
116
|
+
## Theming
|
|
117
|
+
You can customize the appearance of the Accordion component by overriding its own CSS custom properties and those of the [List](../list/README.md) component. Set them on any appropriate parent element to affect its child accordions.
|
|
118
118
|
|
|
119
|
-
|
|
|
120
|
-
|
|
121
|
-
|
|
|
119
|
+
| Custom property | Meaning | Default |
|
|
120
|
+
|---|---|---|
|
|
121
|
+
| `--md-comp-accordion-item-space` | The space between an opened accordion item and its next neighbour. | `0px` |
|
|
122
122
|
|
|
123
123
|
**Example: Changing the margin between an opened item and the next**
|
|
124
124
|
|
|
125
125
|
```HTML
|
|
126
|
-
<div class="micl-list" style="--md-
|
|
126
|
+
<div class="micl-list" style="--md-comp-accordion-item-space:4px">
|
|
127
127
|
<details>
|
|
128
128
|
...
|
|
129
129
|
</details>
|
|
@@ -56,9 +56,9 @@ To change the color, add one of the following modifier classes to the main `<div
|
|
|
56
56
|
|
|
57
57
|
| Class name | Description |
|
|
58
58
|
| ---------- | ----------- |
|
|
59
|
-
| micl-alert--primary | Uses the main color scheme of your application |
|
|
60
|
-
| micl-alert--secondary | Uses a color scheme that is less prominent than the main one |
|
|
61
|
-
| micl-alert--tertiary | Uses a color scheme that provides contrasting accents |
|
|
59
|
+
| `micl-alert--primary` | Uses the main color scheme of your application |
|
|
60
|
+
| `micl-alert--secondary` | Uses a color scheme that is less prominent than the main one |
|
|
61
|
+
| `micl-alert--tertiary` | Uses a color scheme that provides contrasting accents |
|
|
62
62
|
|
|
63
63
|
### Alert Content Structure
|
|
64
64
|
The Alert component is built with a few key structural elements.
|
|
@@ -69,18 +69,18 @@ The Alert component is built with a few key structural elements.
|
|
|
69
69
|
|
|
70
70
|
- `micl-alert__supporting-text` (optional): Used for a short description or supplementary information. It is displayed in a smaller font.
|
|
71
71
|
|
|
72
|
-
##
|
|
73
|
-
|
|
72
|
+
## Theming
|
|
73
|
+
Each alert can be themed with CSS custom properties. Set them on any appropriate parent element to affect its child alerts.
|
|
74
74
|
|
|
75
|
-
|
|
|
76
|
-
|
|
77
|
-
|
|
|
78
|
-
|
|
|
75
|
+
| Custom property | Meaning | Default |
|
|
76
|
+
|---|---|---|
|
|
77
|
+
| `--md-comp-alert-padding` | The inner padding between the alert's edge and its content | `16px` |
|
|
78
|
+
| `--md-comp-alert-space` | The spacing between the optional icon and the text container | `16px` |
|
|
79
79
|
|
|
80
80
|
**Example: Changing the padding**
|
|
81
81
|
|
|
82
82
|
```HTML
|
|
83
|
-
<div style="--md-
|
|
83
|
+
<div style="--md-comp-alert-padding:24px">
|
|
84
84
|
<div class="micl-alert-filled" role="alert">
|
|
85
85
|
...
|
|
86
86
|
</div>
|
|
@@ -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/shape';
|
|
24
23
|
@use '../../styles/typography';
|
|
25
24
|
|
|
@@ -28,27 +27,19 @@
|
|
|
28
27
|
@include typography.scale('title-medium');
|
|
29
28
|
@include typography.scale('body-medium');
|
|
30
29
|
|
|
31
|
-
:
|
|
32
|
-
--md-sys-alert-padding: 16px;
|
|
33
|
-
--md-sys-alert-space: 16px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.micl-alert-filled,
|
|
37
|
-
.micl-alert-tonal,
|
|
38
|
-
.micl-alert-outlined {
|
|
39
|
-
--md-sys-alert-background-color: inherit;
|
|
40
|
-
--md-sys-alert-color: inherit;
|
|
30
|
+
$alerts: ':is(.micl-alert-filled, .micl-alert-tonal, .micl-alert-outlined)';
|
|
41
31
|
|
|
32
|
+
#{$alerts} {
|
|
42
33
|
box-sizing: border-box;
|
|
43
34
|
display: flex;
|
|
44
35
|
inline-size: 100%;
|
|
45
|
-
padding: var(--md-
|
|
46
|
-
column-gap: var(--md-
|
|
36
|
+
padding: var(--md-comp-alert-padding, 16px);
|
|
37
|
+
column-gap: var(--md-comp-alert-space, 16px);
|
|
47
38
|
border: none;
|
|
48
39
|
outline: none;
|
|
49
40
|
border-radius: var(--md-sys-shape-corner-small, 8px);
|
|
50
|
-
background-color: var(--
|
|
51
|
-
color: var(--
|
|
41
|
+
background-color: var(--_background-color, transparent);
|
|
42
|
+
color: var(--_color, inherit);
|
|
52
43
|
|
|
53
44
|
.micl-alert__icon {
|
|
54
45
|
block-size: var(--md-sys-icon-size, 24px);
|
|
@@ -60,7 +51,7 @@
|
|
|
60
51
|
flex-direction: column;
|
|
61
52
|
row-gap: 8px;
|
|
62
53
|
|
|
63
|
-
h1, h2, h3, h4, h5, h6, .micl-heading {
|
|
54
|
+
:is(h1, h2, h3, h4, h5, h6, .micl-heading) {
|
|
64
55
|
@include typography.title-medium;
|
|
65
56
|
|
|
66
57
|
margin: 0;
|
|
@@ -74,53 +65,37 @@
|
|
|
74
65
|
}
|
|
75
66
|
|
|
76
67
|
.micl-alert-filled {
|
|
77
|
-
--
|
|
78
|
-
--
|
|
68
|
+
--_background-color: var(--md-sys-color-error);
|
|
69
|
+
--_color: var(--md-sys-color-on-error);
|
|
79
70
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
--md-sys-alert-background-color: var(--md-sys-color-secondary);
|
|
86
|
-
--md-sys-alert-color: var(--md-sys-color-on-secondary);
|
|
87
|
-
}
|
|
88
|
-
&.micl-alert--tertiary {
|
|
89
|
-
--md-sys-alert-background-color: var(--md-sys-color-tertiary);
|
|
90
|
-
--md-sys-alert-color: var(--md-sys-color-on-tertiary);
|
|
71
|
+
@each $scheme in primary, secondary, tertiary {
|
|
72
|
+
&.micl-alert--#{$scheme} {
|
|
73
|
+
--_background-color: var(--md-sys-color-#{$scheme});
|
|
74
|
+
--_color: var(--md-sys-color-on-#{$scheme});
|
|
75
|
+
}
|
|
91
76
|
}
|
|
92
77
|
}
|
|
93
78
|
|
|
94
79
|
.micl-alert-tonal {
|
|
95
|
-
--
|
|
96
|
-
--
|
|
80
|
+
--_background-color: var(--md-sys-color-error-container);
|
|
81
|
+
--_color: var(--md-sys-color-on-error-container);
|
|
97
82
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
--md-sys-alert-background-color: var(--md-sys-color-secondary-container);
|
|
104
|
-
--md-sys-alert-color: var(--md-sys-color-on-secondary-container);
|
|
105
|
-
}
|
|
106
|
-
&.micl-alert--tertiary {
|
|
107
|
-
--md-sys-alert-background-color: var(--md-sys-color-tertiary-container);
|
|
108
|
-
--md-sys-alert-color: var(--md-sys-color-on-tertiary-container);
|
|
83
|
+
@each $scheme in primary, secondary, tertiary {
|
|
84
|
+
&.micl-alert--#{$scheme} {
|
|
85
|
+
--_background-color: var(--md-sys-color-#{$scheme}-container);
|
|
86
|
+
--_color: var(--md-sys-color-on-#{$scheme}-container);
|
|
87
|
+
}
|
|
109
88
|
}
|
|
110
89
|
}
|
|
111
90
|
|
|
112
91
|
.micl-alert-outlined {
|
|
113
|
-
--
|
|
92
|
+
--_color: var(--md-sys-color-error);
|
|
114
93
|
|
|
115
|
-
border: 1px solid var(--
|
|
94
|
+
border: 1px solid var(--_color);
|
|
116
95
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
--md-sys-alert-color: var(--md-sys-color-secondary);
|
|
122
|
-
}
|
|
123
|
-
&.micl-alert--tertiary {
|
|
124
|
-
--md-sys-alert-color: var(--md-sys-color-tertiary);
|
|
96
|
+
@each $scheme in primary, secondary, tertiary {
|
|
97
|
+
&.micl-alert--#{$scheme} {
|
|
98
|
+
--_color: var(--md-sys-color-#{$scheme});
|
|
99
|
+
}
|
|
125
100
|
}
|
|
126
101
|
}
|
|
@@ -19,6 +19,7 @@ To add a basic (small) app bar, use the `<header>` element with the `micl-appbar
|
|
|
19
19
|
Import the app bar styles into your project:
|
|
20
20
|
|
|
21
21
|
```CSS
|
|
22
|
+
@use "material-inspired-component-library/dist/iconbutton";
|
|
22
23
|
@use "material-inspired-component-library/dist/appbar";
|
|
23
24
|
```
|
|
24
25
|
|
|
@@ -60,7 +61,7 @@ Use the `micl-appbar__leading` (or: `micl-appbar__leading-icon`) class for an el
|
|
|
60
61
|
|
|
61
62
|
```HTML
|
|
62
63
|
<header class="micl-appbar">
|
|
63
|
-
<a href="index.html" class="micl-appbar__leading-icon micl-
|
|
64
|
+
<a href="index.html" class="micl-appbar__leading-icon micl-iconbutton-standard-m" aria-label="Home">
|
|
64
65
|
<span class="material-symbols-outlined" aria-hidden="true">home</span>
|
|
65
66
|
</a>
|
|
66
67
|
<div class="micl-appbar__headline">
|
|
@@ -86,14 +87,26 @@ Use the `micl-appbar__trailing` (or: `micl-appbar__trailing-icon`) class for ele
|
|
|
86
87
|
### Sticky app bar
|
|
87
88
|
The app bar is 'glued' to the top of the page when one of the following conditions is met:
|
|
88
89
|
|
|
89
|
-
- The [
|
|
90
|
-
- The
|
|
91
|
-
- The
|
|
92
|
-
- The
|
|
93
|
-
- The
|
|
90
|
+
- The [pane area](../../foundations/layout/README.md) contains only one pane.
|
|
91
|
+
- The pane area contains two or more panes and the window is at the compact breakpoint.
|
|
92
|
+
- The pane area contains two or more panes, has the `micl-panes--stacked-to-expanded` class and the window is at the compact or medium breakpoint.
|
|
93
|
+
- The pane area contains two or more panes, has the `micl-panes--stacked-to-large` class and the window is at the compact, medium or expanded breakpoint.
|
|
94
|
+
- The pane area contains two or more panes, has the `micl-panes--stacked-to-extralarge` class and the window is at the compact, medium, expanded or large breakpoint.
|
|
94
95
|
- The app bar has the `micl-appbar--sticky` class.
|
|
95
96
|
|
|
96
97
|
Adding the `micl-appbar--not-sticky` class to the app bar will prohibit gluing the app bar to the top of the page.
|
|
97
98
|
|
|
99
|
+
## Theming
|
|
100
|
+
Each app bar can be themed with CSS custom properties that follow the Material Design 3 component-token naming convention. Set them on any appropriate parent element to affect its child app bars.
|
|
101
|
+
|
|
102
|
+
| Custom property | Meaning | Default |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| `--md-comp-app-bar-container-color` | The background color of the app bar | inherited from the page |
|
|
105
|
+
| `--md-comp-app-bar-on-scroll-container-color` | The background color while the page is scrolled | `--md-sys-color-surface-container` |
|
|
106
|
+
| `--md-comp-app-bar-title-color` | The text color of the headline | `--md-sys-color-on-surface` |
|
|
107
|
+
| `--md-comp-app-bar-subtitle-color` | The text color of the subtitle | `--md-sys-color-on-surface-variant` |
|
|
108
|
+
| `--md-comp-app-bar-leading-icon-color` | The color of the leading icon | `--md-sys-color-on-surface` |
|
|
109
|
+
| `--md-comp-app-bar-trailing-icon-color` | The color of the trailing icons | `--md-sys-color-on-surface-variant` |
|
|
110
|
+
|
|
98
111
|
## Compatibility
|
|
99
112
|
This component uses the `animation-timeline` CSS property for the scroll-effect, which may not be supported in your browser. Please check [Browser compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timeline#browser_compatibility) for details.
|