JSPM

  • Created
  • Published
  • Downloads 172
  • Score
    100M100P100Q66432F
  • License Apache-2.0

Components based on the Google Material Design Lite framework

Package Exports

  • mdl-ext

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mdl-ext) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

mdl-ext

travis build codecov coverage semantic-release version

Material Design Lite Ext (MDLEXT). Components built with the Google Material Design Lite framework.

Install

If you haven't done so already, install Material Design Lite.

$ npm install --save material-design-lite

Install mdl-ext

$ npm install --save mdl-ext

Getting started

Use it in your (static) page

<!DOCTYPE html>
<html>
<head>
  <title>Material Design Lite Extensions</title>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en">
  <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
  <link rel="stylesheet" href="node_modules/material-design-lite/material.css" />
  <link rel="stylesheet" href="node_modules/mdl-ext/lib/mdl-ext.min.css" />
</head>
<body>
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer">
  <main class="mdl-layout__content">
  </main
</div>
<script type="text/javascript" src="node_modules/material-design-lite/material.min.js" charset="utf-8"></script>
<script type="text/javascript" src="node_modules/mdl-ext/lib/index.min.js" charset="utf-8"></script>
</body>
</html>

Note: Always import mdl-ext css after material css. Adjust path to node_modules according to where your HTML file is located.

Use it in your (Webpack) build

Import SASS files

@charset "UTF-8";

// 1. Import MDL
@import '../node_modules/material-design-icons/iconfont/material-icons.css';
@import '../node_modules/roboto-fontface/css/roboto-fontface.css';
@import '../node_modules/material-design-lite/src/material-design-lite';

// 2. Import MDLEXT
@import '../node_modules/mdl-ext/src/mdl-ext';

// 3. Your stuff
@import 'stylesheets/variables';
@import 'stylesheets/app/whatever';

Imports above assumes that your main SASS file is located in the ./src folder. Adjust path to node_modules according to where your SASS file is located.

Import material-design-lite and mdl-ext scripts in your "main" js file

import 'material-design-lite/material';
import 'mdl-ext';

... or require material-design-lite and mdl-ext

require('material-design-lite/material');
require('mdl-ext');

Components

Accordion

Accordion

A WAI-ARIA friendly accordion component with vertcial or horizontal layout.

Bordered fields

Bordered fields

The Material Design Lite Ext (MDLEXT) bordered fields component demonstrates how you can create your own theme of MDL text fields.

Lightboard

Lightboard

A lightboard is a translucent surface illuminated from behind, used for situations where a shape laid upon the surface needs to be seen with high contrast. In the "old days" of photography photograpers used a lightboard to get a quick view of, sorting and organizing their slides.

Selectfield

Selectfield

The Material Design Lite Ext (MDLEXT) select field component is an enhanced version of the standard [HTML <select>] (https://developer.mozilla.org/en/docs/Web/HTML/Element/select) element.

Notes

To see the MDLEXT components in action, after download/clone/install, open the demo/index.html in a browser.

You can also download or clone a demo project from here: https://github.com/leifoolsen/mdl-webpack. The demo project demonstrates how you can set up MDL with Babel(6) and Webpack, and how to self host Font Roboto and Material Icons in your web application.

Licence

© Leif Olsen, 2016. Licensed under an Apache-2 license.

This software is built with the Google Material Design Lite framework, which is licenced under an Apache-2 licence.