menu
Dark Mode
backgroundLayer 1
preact-material-components
Components and their props
  • Elevation
    • z 0 to 24
      Add z=(0 to 24) to get different elevations.
Sample code
import {h, Component} from 'preact';
import Elevation from 'preact-material-components/Elevation';
import 'preact-material-components/Elevation/style.css';

export default class ElevationPage extends Component {
  render(){
    return (
      <div>
        <Elevation z={0}>Z0</Elevation>
        <Elevation z={1}>Z1</Elevation>
        <Elevation z={2}>Z2</Elevation>
      </div>
    );
  }
}
Original documentation
This component encapsulates mdc-elevation, you can refer to its documentation here.
Demo

Z0

Z1

Z2

Z3

Z4