Skip to content

material-motion/material-motion-js

Repository files navigation

Material Motion for JavaScript

This is an experimental implementation of the concepts outlined in the Material Motion Starmap.

High-level Goals

  • To enable the motions and gestures proposed in the Material Spec to be easily implemented by application authors in the JS ecosystem.

  • To make prototyping new animated experiences simpler.

  • To allow authors to write views in terms of URLs, and have the system guide the transitions between them.

  • To yield a system that feels robust by default. Fragile transitions erode user trust in the overall system: “should I enter my password in a glitchy app?”

Usage

Material Motion needs some Performers to do the actual animating. You can install the default set by adding this line to the imports in your primary JavaScript file:

import * as MaterialMotion from "material-motion-experiments";

Setup

As with any modern JavaScript library, you can install the dependencies using npm install. To see our examples locally, you should also have AppEngine SDK installed and on your PATH.

Development

  • npm start: Starts the AppEngine and Webpack dev servers, with Hot Module Replacement enabled.
  • npm run test: Runs Flow type checker and ESLint. Unit tests coming eventually.
  • npm run build: Bundles src and examples in dist and site, respectively.
  • npm run clean: Removes JavaScript bundles from dist and site.
  • npm run deploy-site: Updates the demo site.

License

Apache 2.0