Angular Material - WhiteFrame



Angular Material has several special classes to display containers as paper-like cards with shadow.

The following table lists down the different classes with their description.

Sr.No Class Name & Description
1

md-whiteframe-1dp

This styles a container for any HTML content with 1px bordered shadow. Adds zdepth of 1.

2

md-whiteframe-2dp

This styles a container for any HTML content with 2px bordered shadow. Adds zdepth of 2.

3

md-whiteframe-3dp

This styles a container for any HTML content with 3px bordered shadow. Adds zdepth of 3.

4

md-whiteframe-4dp

This styles a container for any HTML content with 4px bordered shadow. Adds zdepth of 4.

5

md-whiteframe-5dp

This styles a container for any HTML content with 5px bordered shadow. Adds zdepth of 5.

6

md-whiteframe-6dp

This styles a container for any HTML content with 6px bordered shadow. Adds zdepth of 6.

7

md-whiteframe-7dp

This styles a container for any HTML content with 7px bordered shadow. Adds zdepth of 7.

8

md-whiteframe-8dp

This styles a container for any HTML content with 8px bordered shadow. Adds zdepth of 8.

9

md-whiteframe-9dp

This styles a container for any HTML content with 9px bordered shadow. Adds zdepth of 9.

10

md-whiteframe-10dp

This styles a container for any HTML content with 10px bordered shadow. Adds z-depth of 10.

11

md-whiteframe-11dp

This styles a container for any HTML content with 11px bordered shadow. Adds z-depth of 11.

12

md-whiteframe-12dp

This styles a container for any HTML content with 12px bordered shadow. Adds z-depth of 12.

13

md-whiteframe-13dp

This styles a container for any HTML content with 13px bordered shadow. Adds z-depth of 13.

14

md-whiteframe-14dp

This styles a container for any HTML content with 14px bordered shadow. Adds z-depth of 14.

15

md-whiteframe-15dp

This styles a container for any HTML content with 15px bordered shadow. Adds z-depth of 15.

16

md-whiteframe-16dp

This styles a container for any HTML content with 16px bordered shadow. Adds z-depth of 16.

17

md-whiteframe-17dp

This styles a container for any HTML content with 17px bordered shadow. Adds z-depth of 17.

18

md-whiteframe-18dp

This styles a container for any HTML content with 18px bordered shadow. Adds z-depth of 18.

19

md-whiteframe-19dp

This styles a container for any HTML content with 19px bordered shadow. Adds z-depth of 19.

20

md-whiteframe-20dp

This styles a container for any HTML content with 20px bordered shadow. Adds z-depth of 20.

21

md-whiteframe-21dp

This styles a container for any HTML content with 21px bordered shadow. Adds z-depth of 21.

22

md-whiteframe-22dp

This styles a container for any HTML content with 22px bordered shadow. Adds z-depth of 22.

23

md-whiteframe-23dp

This styles a container for any HTML content with 23px bordered shadow. Adds z-depth of 23.

24

md-whiteframe-24dp

This styles a container for any HTML content with 24px bordered shadow. Adds z-depth of 24.

Example

The following example shows the use of shadow classes.

am_whiteframes.htm

<html lang = "en">
   <head>
      <link rel = "stylesheet"
         href = "https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css">
      <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
      <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script>
      <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
      <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js"></script>
      <script src = "https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script>
      <link rel = "stylesheet" href = "https://fonts.googleapis.com/icon?family=Material+Icons">
      
      <style>
         .frameContainer md-whiteframe {
            background: #fff;
            margin: 30px;
            height: 100px; 
         }
      </style>
      
      <script language = "javascript">
         angular
            .module('firstApplication', ['ngMaterial'])
            .controller('frameController', frameController);
           
         function frameController ($scope) {               
         }	  
      </script>      
   </head>
   
   <body ng-app = "firstApplication"> 
      <div class = "frameContainer" ng-controller = "frameController as ctrl"
         layout = "row" layout-padding layout-wrap layout-fill
         style = "padding-bottom: 32px;" ng-cloak>
         <md-whiteframe class = "md-whiteframe-1dp" flex-sm = "45" flex-gt-sm = "35"
            flex-gt-md = "25" layout layout-align = "center center">
            <span>.md-whiteframe-1dp</span>
         </md-whiteframe>
         
         <md-whiteframe class = "md-whiteframe-2dp" flex-sm = "45" flex-gt-sm = "35"
            flex-gt-md = "25" layout layout-align = "center center">
            <span>.md-whiteframe-2dp</span>
         </md-whiteframe>
         
         <md-whiteframe class = "md-whiteframe-3dp" flex-sm = "45" flex-gt-sm = "35"
            flex-gt-md = "25" layout layout-align = "center center">
            <span>.md-whiteframe-3dp</span>
         </md-whiteframe>
         
         <md-whiteframe class = "md-whiteframe-10dp" flex-sm = "45" flex-gt-sm = "35"
            flex-gt-md = "25" layout layout-align = "center center">
            <span>.md-whiteframe-10dp</span>
         </md-whiteframe>
         
         <md-whiteframe class = "md-whiteframe-15dp" flex-sm = "45" flex-gt-sm = "35"
            flex-gt-md = "25" layout layout-align = "center center">
            <span>.md-whiteframe-15dp</span>
         </md-whiteframe>
         
         <md-whiteframe class = "md-whiteframe-20dp" flex-sm = "45" flex-gt-sm = "35"
            flex-gt-md = "25" layout layout-align = "center center">
            <span>.md-whiteframe-20dp</span>
         </md-whiteframe>
         
         <md-whiteframe class = "md-whiteframe-22dp" flex-sm = "45" flex-gt-sm = "35"
            flex-gt-md = "25" layout layout-align = "center center">
            <span>.md-whiteframe-22dp</span>
         </md-whiteframe>
         
         <md-whiteframe class = "md-whiteframe-23dp" flex-sm = "45" flex-gt-sm = "35"
            flex-gt-md = "25" layout layout-align = "center center">
            <span>.md-whiteframe-23dp</span>
         </md-whiteframe>
         
         <md-whiteframe class = "md-whiteframe-24dp" flex-sm = "45" flex-gt-sm = "35"
            flex-gt-md = "25" layout layout-align = "center center">
            <span>.md-whiteframe-24dp</span>
         </md-whiteframe>
      </div>
   </body>
</html>

Result

Verify the result.

Advertisements