• Stars
    star
    116
  • Rank 303,894 (Top 6 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Material Design implemented in Web Components (Custom Elements v1)

Material Web Components

Material Design implemented in Web Components (Custom Elements v1) https://dannymoerkerke.github.io/material-webcomponents/

Getting started

To install Material Web Components run:

npm install @dannymoerkerke/material-webcomponents

Then simply import the component you need in your script, for example:

import './node_modules/@dannymoerkerke/material-webcomponents/src/material-button.js';

Or include it with a script tag as an ES6 module:

<script src="node_modules/@dannymoerkerke/material-webcomponents/src/material-button.js" type="module"></script>

Add the HTML tag:

<material-button label="Confirm" raised></material-button>

...and you're in business!

Documentation

Refer to https://dannymoerkerke.github.io/material-webcomponents/ for documentation of each component.

Demo

To run the demo, run npm install once and then npm start and view the demo on http://localhost:8080/material-webcomponents

Testing

Run npm test and view the results on http://localhost:8080/ or run npm run test:headless to run the tests on the command line.

This repo also contains the configuration file wallaby.js to run the tests from your IDE using Wallaby.js

Browser support

  • Chrome 53+
  • Firefox 63+
  • Safari 10+
  • iOS Safari 10+
  • Chrome Android 71+
  • Firefox Android 64+
  • Edge 16+ (with polyfill)

Polyfilling Edge 16+

Refer to /lib/polyfill-loader.js to see how the webcomponentsjs polyfill and the Webpack bundle are loaded. The Webpack bundle only parses the CSS inside Shadow DOM. Note that the webpack loader is only suitable for browsers that do not support Shadow DOM.

More Repositories

1

whatpwacando.today

Repo to collect bugs for https://whatpwacando.today/
552
star
2

instant-multi-page-app

HTML
258
star
3

basic-service-worker

A basic Service Worker to make your web app work offline
JavaScript
113
star
4

custom-element

A base class for Web Components (Custom Elements) which provides simple data binding.
JavaScript
87
star
5

sw-proxy

A really tiny proxy server which utilizes a service worker
80
star
6

webauthn-demo

A demo of passwordless Web Authentication (WebAuth)
JavaScript
79
star
7

swopr

A really tiny proxy server which utilizes a service worker
JavaScript
60
star
8

file-tree

A file tree web component using the File System Access API
JavaScript
47
star
9

lazy-img

Lazy loading image implemented as a Web Component
JavaScript
41
star
10

audio-recorder

Audio Recorder Web Component
JavaScript
37
star
11

form-element-mixin

Mixin to associate a Custom Element with forms
JavaScript
12
star
12

client-side-router

A very basic client-side router implemented using Web Components that extend built-in HTML elements
HTML
9
star
13

web-push-demo

A demo of the Web Push API
HTML
8
star
14

image-gallery

An image gallery Web Component
JavaScript
6
star
15

brackets-selections

A Brackets extension that adds Sublime Text style selections to Brackets.
JavaScript
4
star
16

brackets-php-doc

A Brackets extension to consult the php.net documentation.
JavaScript
3
star
17

brackets-codeintel

A Brackets extension which enables you to quickly navigate to classes and methods in any PHP file.
JavaScript
3
star
18

speech-paragraph

JavaScript
2
star
19

custom-elements-css-loader

Webpack loader for Custom Elements CSS
JavaScript
1
star
20

web-utils

A collection of Web Components to leverage the modern web platform
1
star