Foundation
Elevation
Indicate hierarchy and create focus through the use of depth
Usage
Elevation is used to indicate hierarchy and create focus through the use of depth. Components with the same elevations create an effect of grouping and similarity between content while components on different elevations reflect spatial relationships. Elevation is depicted through shadows to create an effect of depth. Components closer to the base layer have sharper shadows, while components that are elevated have softer shadows. You can chek out the guideline for more detail description.
import { tokens } from 'legion-ui';
Preview
Shape | Token Name | Box Shadow |
---|---|---|
tokens.elevation0 | 0px 0px 0px 2px #EEAFAF | |
tokens.elevation1 | 0px 1px 0px rgba(0, 0, 0, 0.05) | |
tokens.elevation2 | 0px 1px 1px rgba(0, 0, 0, 0.05), 0px 0px 1px rgba(0, 0, 0, 0.25) | |
tokens.elevation3 | 0px 2px 10px rgba(0, 0, 0, 0.1), 0px 0px 2px rgba(0, 0, 0, 0.2) | |
tokens.elevation4 | 0px 4px 20px rgba(0, 0, 0, 0.15), 0px 0px 3px rgba(0, 0, 0, 0.1) | |
tokens.elevation5 | 0px 8px 40px rgba(0, 0, 0, 0.2), 0px 0px 4px rgba(0, 0, 0, 0.1) |
<div style="box-shadow: tokens.elevation0"/><div style="box-shadow: tokens.elevation1"/><div style="box-shadow: tokens.elevation2"/><div style="box-shadow: tokens.elevation3"/><div style="box-shadow: tokens.elevation4"/><div style="box-shadow: tokens.elevation5"/>
Do you have feedback?
Please let us know to make it better