Git Product home page Git Product logo

material's Introduction

Material Design for AngularJS Apps

npm version Build Status

Material Design is a specification for a unified system of visual, motion, and interaction design that adapts across different devices. Our goal is to deliver a lean, lightweight set of AngularJS-native UI elements that implement the material design specification for use in AngularJS single-page applications (SPAs).

AngularJS Material is an implementation of Google's Material Design Specification (2014-2017) for AngularJS (v1.x) developers.

For an implementation of the Material Design Specification (2018+), please see the Angular Material project which is built for Angular (v2+) developers.

End-of-Life

AngularJS Material support has officially ended as of January 2022. See what ending support means and read the end of life announcement. Visit material.angular.io for the actively supported Angular Material.

Find details on reporting security issues here.

venn diagram

AngularJS Material includes a rich set of reusable, well-tested, and accessible UI components.

Quick Links:

Please note that using the latest version of AngularJS Material requires the use of AngularJS 1.7.2 or higher.

AngularJS Material supports the browser versions defined in the browserslist field of our package.json. Find out more on our docs site.

AngularJS Material supports the screen reader versions listed here.

Online Documentation and Demos


  • Visit material.angularjs.org online to review the API, see the components in action via live demos, and to read our detailed guides which include the layout system, theming system, typography, and more.
  • Or you can build the documentation and demos locally; see Build Docs & Demos for details.

Building

Developers can build AngularJS Material using NPM and gulp.

First install or update your local project's npm dependencies:

npm install

Install Gulp v3 globally:

npm install -g gulp@3

Then run the gulp tasks:

# To build `angular-material.js/.css` and `Theme` files in the `/dist` directory
gulp build

# To build the AngularJS Material Docs and Demos in `/dist/docs` directory
gulp docs

For development, use the docs:watch NPM script to run in dev mode:

# To build the AngularJS Material Source, Docs, and Demos in watch mode
npm run docs:watch

For more details on how the build process works and additional commands (available for testing and debugging) developers should read the Build Guide.

Installing Build (Distribution Files)

NPM

For developers not interested in building the AngularJS Material library... use NPM to install and use the AngularJS Material distribution files.

Change to your project's root directory.

# To get the latest stable version, use NPM from the command line.
npm install angular-material --save

# To get the most recent, latest committed-to-master version use:
npm install http://github.com/angular/bower-material#master --save

Other Dependency Managers

Visit our distribution repository for more details on how to install and use the AngularJS Material distribution files within your local project.

CDN

CDN versions of AngularJS Material are available.

With the Google CDN, you will not need to download local copies of the distribution files. Instead, simply reference the CDN urls to easily use those remote library files. This is especially useful when using online tools such as CodePen or Plunker.

  <head>

    <!-- AngularJS Material CSS now available via Google CDN; version 1.2.1 used here -->
   <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.2.1/angular-material.min.css">

  </head>
  <body>

    <!-- AngularJS Material Dependencies -->
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-animate.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-aria.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-messages.min.js"></script>

    <!-- AngularJS Material Javascript now available via Google CDN; version 1.2.1 used here -->
    <script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.2.1/angular-material.min.js"></script>
  </body>

Developers seeking the latest, most-current build versions can use GitCDN.xyz to pull directly from our distribution repository:

  <head>

    <!-- AngularJS Material CSS using GitCDN to load directly from `bower-material/master` -->
    <link rel="stylesheet" href="https://gitcdn.xyz/cdn/angular/bower-material/master/angular-material.css">

  </head>
  <body>

    <!-- AngularJS Material Dependencies -->
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-animate.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-aria.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-messages.min.js"></script>

    <!-- AngularJS Material Javascript using GitCDN to load directly from `bower-material/master` -->
    <script src="https://gitcdn.xyz/cdn/angular/bower-material/master/angular-material.js"></script>

  </body>

Once you have all the necessary assets installed, add ngMaterial and ngMessages as dependencies for your app:

angular.module('myApp', ['ngMaterial', 'ngMessages']);

material's People

Contributors

adamdbradley avatar ajoslin avatar bradrich avatar btford avatar clshortfuse avatar codymikol avatar crisbeto avatar devversion avatar eladbezalel avatar epelc avatar erincoughlan avatar gkalpak avatar jelbourn avatar jesselpalmer avatar kara avatar kseamon avatar marosoft avatar matsko avatar matthewrfindley avatar mlynch avatar mmalerba avatar oliversalzburg avatar petebacondarwin avatar programmist avatar robertmesserle avatar rschmukler avatar splaktar avatar thomasburleson avatar topherfangio avatar typotter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

material's Issues

There should be a visual indicator when hovering over the checkbox

Is it possible to add some sort of visual indicator on the checkbox aside from just changing the mouse cursor?

This would be helpful especially when the checkbox is ticked as there is no border around the checkbox it feels like we have to aim closer to trigger.

Disable Y scroll when touchstart is a slider

If a range was the touch start, and the user scrolled on the Y axis, then the range is disabled from working. Look into ways to improve dragging the slider (range element) on touch devices.

Fix Ink Ripple to work with buttons

Radio buttons, icon buttons, and checkboxes all need to support an ink effect. For example, the checkbox should support:

<material-checkbox selected="true">
  <material-ripple class="center recenteringTouch"></material-ripple>
</material-checkbox>

In tabs, the ink ripple will fill the size of each tab button area. For the above buttons, however, tabs will not fill a parent container... instead inks will be sized and positioned with respect to the button element.

"Material: Form" - ui broken on the design page

It'd appear the the html is rendering content part in the material-toolbar section:

<material-toolbar class="material-theme-dark material-tall"><div class="material-toolbar-inner" ng-transclude="">
    <div class="material-toolbar-tools ng-scope">
      <div class="material-flex">
        <div class="material-input-group-theme-light material-input-group-inverted material-input-group ng-isolate-scope" fid="t1"><label for="t1">Description</label><input id="t1" type="text" ng-model="data.description" class="ng-pristine ng-valid"></div>
        <div class="material-input-group-theme-light-blue material-input-group-inverted material-input-group ng-isolate-scope" fid="t2"><label for="t2">Description</label><input id="t2" type="text" ng-model="data.description" class="ng-pristine ng-valid"></div>
      </div>
    </div>
  </div>
</material-toolbar>

screen shot 2014-07-06 at 20 35 21

CSS issues on Safari

  • checkbox animation is offset
  • whiteframes need work
  • sliders and tabs are condensed

[needs a full review]

Demo site should have some top-level content.

Text should crib from the README.md. How about this:


Material Design[link] is a specification for a unified system of visual, motion, and interaction design that adapts across different devices.

The material design project for Angular is a complementary effort to the Polymer[link] project's paper elements[link] collection. Our goal is to provide a set of AngularJS-native UI elements that implement the material design system. This demo is a work in progress.

For more, see our repository on github[link].


Typography guidelines?

The demo site is not reflecting Typography guidelines
with respect to Characters per line lengths.
http://www.google.com/design/spec/style/typography.html#typography-standard-styles

Especially when the site is on a wider screen,
the content text has no container to limit it
to a sensible width.

image

The Google Material Design website, in contrast, does follow this guideline.

I suppose there are three options for this:
re-invent a framework like Bootstrap with its grid system concept,
have people roll their own grid-like framework, or actually use such
a framework like Bootstrap in the demo system. My suspicion
is, whether they should or should not, many people will try to integrate
Bootstrap grids into this system. Perhaps the pending guidelines for
this project will give direction here...

Also, the demo site does not appear to be reflecting Typography guidelines
with respect to spacing of typographic elements relative to their
containers.
(a) There appears to be insufficient padding on the left side of text elements.
This sticks out especially when the left side navigation has a large drapshadow,
as the text almost becomes dirty.
image

(b) Text elements are not aligned.
Compare left nav of demo site:

image

vs. left nav of Goolge Material Design website:

image

How to actually use this?

Hi,

I have been looking through this repo and the docs but I didn't find any notes on how to get this working.

fix(radio) - RadioButton(s) used with ng-repeat breaks ink ripple

See the radioButton/demo - the second sample using:

 <material-radio-group>

        <material-radio-button ng-repeat="d in radioData">
            <input type="radio" ng-value="d.value" ng-model="data.group1">
            {{ d.label }}
        </material-radio-button>

    </material-radio-group>

This code somehow interferes with the sizing of the ink ripple.

Tab component that is disabled and mouse hover

The material-tab element has the cursor: pointer property.

image

This results in an awkward situation when a tab is set to disabled.

Hovering over the text will indicate the link is disabled...
image

...but hovering anywhere outside the text on the disabled material-tab gives the indication of a hover event, and thereby tends to give the impression that the link in fact is active.

image

fix(tab) - ink isn't active until click

If I have material-tabs with a default selected tab, the ink doesn't show up until I click a tab.

<material-tabs selected="0">
  <material-tab label="No ink until I click!"></material-tab>
</material-tab>

demo site should always use minified angularjs

I thought I caught most of these before we went live with the site, but it looks like I missed some. Right now we use a mix of minified and unminified links to the angular (and related) library. These should be updated to only use the minified version from the CDN.

All controls need visual focus affordances

My contribution to #16...

When I tab over the controls I expect to be able to visually tell which control has focus, but I can't. I didn't see any controls that had focus styles so this seems to be a problem across the board, not with any particular control.

CLA?

We have a CONTRIBUTING.md file, but it does not have any legalese for handling licensing of community contributed content.

This is a placeholder as I'm not sure what we want to do on this front.

Enhance demos to support source code popups

Each demo should support a Show Source button to use the popup dialog (or other mechanism) and render highlighted source code for the current demo. Ideally, each demo folder will have a source.html which will contain the desired source and css and javascript that should be displayed as demo source.

Perform an accessibility audit

We have some work to do on accessibility. This is really a placeholder issue until we have done the audit and can file component-specific issues.

Use protocol-relative URLs

As much as possible, we serve over HTTPS.

Use //some.url.angularjs.org instead of http://some.url.angularjs.org or https://some.url.angularjs.org.

minified images don't render

@btford one of your tweaks to the server seems to have broken the images in dist/ They look fine unminified under docs/app -- can you investigate?

chore: remove console.log

You might wanna remove the console.log in materialRadioGroupDirective. It might also be good to add a warning during build for this kind of thing.

fix(tab) - Tab indicator height

It seems the proper implementation for the tab indicator height (at least when viewing on a standard desktop) would be 2px rather than the 4px currently in place.

Compare the sleeker tab indicator of the Google site:
image

...with the bigger tab indicator on the angular/material demo site:
image

The bigger tab indicator does not seem to mesh with the design spec or
appear as aesthetically clean.

Changing the material-ink styling from 4px to 2px results in a look closer to the spec.

material-ink {
    height: 2px;           /* previously 4px */
    background: #ffff85;
    position: absolute;
    margin-top: -2px;      /* previously -4px */
}

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.