Elevations create a sense of depth by applying a drop shadow to an element.
🙌 Heads up! This code is editable. The preview above will update to reflect your changes.
Usage
import { Elevation } from 'materialish';
import 'materialish/materialish.css';
Props
Prop Name | Default Value | Description |
---|
className | | Additional class name(s) to add to the elevation |
depth | 1 | A value between 0 and 5 that represents how far from the page the element should appear |
nodeRef | | Pass a ref to get access to the root node |
...rest | | Other props are placed on the root element of the elevation |
CSS Variables
Variable | Default Value | Description |
---|
--mt-baseFontSize | 1rem | The size of text within the elevation |
--mt-fontFamily | 'Roboto' | The font family to use for text |