React Bootstrap Shadows

React Shadows - Bootstrap 4 & Material Design

Note: We are transitioning MDB4 to a legacy version and focusing on developing MDB5. While we'll continue to support for the transition period, we encourage you to migrate to MDB5. We're offering a 50% discount on MDB5 PRO to help with your transition, enabling you to leverage the full potential of the latest version. You can find more information here.
get 50% discount on MDB5 PRO

React Bootstrap shadow is an effect used in web elements which provides important visual cues about objects' depth and directional movement.

They are the only visual cue indicating the amount of separation between surfaces. An object’s elevation determines the appearance of its shadow.

Creating shadows with MDB is very easy. You only need to add one of the shadow classes to chosen element.


Examples

Add one of the following classes to any html element to achieve a desired depth of the shadow

.z-depth-1

.z-depth-1-half

.z-depth-2

.z-depth-3

.z-depth-4

.z-depth-5

        
            
          import React from "react";
          
          const ShadowsPage = () => {
            return <div className="shadow-box-example z-depth-5"></div>;
          }
          
          export default ShadowsPage;
        
        
    
        
            
            .shadow-box-example {
              height: 120px;
              width: 100%;
              background-color: #64b5f6;
            }
          
        
    

.z-depth-0

To remove existing shadow from given element use className .z-depth-0

Shadow on hover

hover me!

        
            
          import React from "react";
          
          const ShadowsPage = () => {
            return <div className="shadow-box-example hoverable"></div>;
          }
          
          export default ShadowsPage;
        
        
    
        
            
          .shadow-box-example {
            height: 120px;
            width: 100%;
            background-color: #64b5f6;
          }