@shortfuse/materialdesignweb v0.9.0
materialdesignweb
Material Design for Web
A standards-focused, zero-dependency implemention of Material Design 3 (Material You).
 
 
 
Demo
https://clshortfuse.github.io/materialdesignweb/
Getting started
Pre-bundled
<script type="module"
  src="https://cdn.jsdelivr.net/npm/@shortfuse/materialdesignweb?color=6750A4"></script>
<mdw-button>Hello World!</mdw-button>Includes all components and theming over URL params.
Development
Static Theme Generation:
npx -p @shortfuse/materialdesignweb mdw-css --color=color=6750A4 --custom=yellow,orange:orange,green:0f0,alias:aqua --lightness=auto > theme.css
Dynamic Theme Generation:
See loader.js for an example.
Component Loading
import { Button } from '@shortfuse/materialdesignweb';
// OR
import Button from '@shortfuse/materialdesignweb/components/Button.js';
// OR
import Button from 'https://www.unpkg.com/@shortfuse/materialdesignweb/components/Button.js';
// OR
import { Button } from 'https://cdn.jsdelivr.net/npm/@shortfuse/materialdesignweb?color=6750A4';
const button = new Button();
button.textContent = 'Hello World!';
document.body.append(button);Support
Compatibility is kept for as long possible by including browser-version-based patches. Ultimately, compatiblity may be dropped as new features get added. Bugs present in supported browsers should always be fixed.
| Feature | Chrome | Edge | Firefox | Safari | 
|---|---|---|---|---|
| ShadowRoot | 53 | 79 | 63 | 10 | 
| WeakRef | 84 | 84 | 79 | 14.1 | 
| :where() | 88 | 88 | 78 | 14 | 
| Array.at† | 92 | 92 | 90 | 15.4 | 
| replaceChildren† | 84 | 86 | 79 | 14.1 | 
| ElementInternals† | 77 | 79 | 93 | 16.4 | 
| delegatesFocus† | 53 | 79 | 94 | 15 | 
| AdoptedStyleSheets* | 73 | 79 | 101 | 16.4 | 
| CSS container queries* | 106 | 106 | 110 | 16.0 | 
| Compatibility | 88 | 88 | 78 | 16.4 | 
| Support | Latest ChromeOS LTS Release | Microsoft Edge Extended Stable Channel | ESR 115 | Last 2 Versions | 
| Status | 
*Optional
†Can be polyfilled
Notes:
- Compatibility may be extended via polyfills (not included)
Components
Additional
| Component | Description | Status | Size | 
|---|---|---|---|
| Box | Simple themeable component with Flex and Grid options | :heavy_check_mark: | |
| Layout | Manages page nav, and pane layouts | :construction: | |
| Icon | Font-icon, SVG, and IMG support | :construction: | |
| Body | Box with Body typography | :heavy_check_mark: | |
| Label | Box with Label typography | :heavy_check_mark: | |
| Headline | Box with Headline typography | :heavy_check_mark: | |
| Title | Box with Title typography | :heavy_check_mark: | |
| Ripple | Ripple effect | :heavy_check_mark: | |
| Shape | Themeable, flexable, shapeable element | :heavy_check_mark: | |
| Surface | Themeable, flexable, shapeable, elevateable element | :heavy_check_mark: | 
Mixins
| Mixin | Description | Status | Size | 
|---|---|---|---|
| AriaReflector | Reflects ARIA Properties | :heavy_check_mark: | |
| AriaToolbar | Shared ARIA Toolbar functionality | :heavy_check_mark: | |
| Control | HTML Control wrapper | :heavy_check_mark: | |
| Density | Component density options | :heavy_check_mark: | |
| Flexable | Add flexbox options as attributes | :heavy_check_mark: | |
| FormAssociated | Form-associated custom element support | :heavy_check_mark: | |
| Input | HTMLInputElement wrapper | :heavy_check_mark: | |
| KeyboardNav | Adds arrow key navigation and roving tab index | :warning: | |
| ResizeObserver | Shared Eelement resize observer | :heavy_check_mark: | |
| Ripple | Replaces pressed state with ripple effect | :heavy_check_mark: | |
| RTLObserver | Shared RTL paoge observer | :heavy_check_mark: | |
| ScrollListener | Listen for horizontal and vertical scroll events | :heavy_check_mark: | |
| Shape | Adds shape and outline layer to elements | :warning: | |
| Surface | Adds shadows to elements | :warning: | |
| TextField | Shared text field functionality | :heavy_check_mark: | |
| TooltipTrigger | Triggers tooltips based on events | :construction: | |
| TouchTarget | Adds extended touch target to controls | :construction: | 
Core
| File | Description | Status | Size | 
|---|---|---|---|
| Composition | Composes templates based on styles, fragments, and watches. Renders data | :construction: | |
| CustomElement | Handles ShadowDOM, ElementInternals, Property attributes, and compositions | :construction: | |
| CompositionAdapter | Handles data array to elements binding | :construction: | |
| jsonMergePatch | Applies, constructors, and evaluates JSON Merge Patch | :construction: | |
| css | CSS, CSSStyleSheet, HTMLStyleElement functions | :heavy_check_mark: | |
| customTypes | Non-primitive observable types | :construction: | |
| optimizations | Micro-optimizations functions | :construction: | |
| dom | DOM functions | :warning: | |
| observe | Observable pattern for primitives and objects | :construction: | |
| template | Template literals for CSS (CSSStyleSheet) and HTML (DocumentFragment) | :heavy_check_mark: | 
1 year ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago