Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
Using depth can be an important design technique to highlight certain elements, give a sense of visual hierarchy and more.
To add depth to anything you can use the ab-container
utility component.
It allows you to apply depth by using certain modifiers.
Class (CSS) | Attribute (Web Component) |
---|---|
ab-container--depth-none | depth="none" |
ab-container--depth-100 | depth="100" |
ab-container--depth-200 | depth="200" |
ab-container--depth-300 | depth="300" |
ab-container--depth-400 | depth="400" |
ab-container--depth-500 | depth="500" |
ab-container--depth-500 | depth="600" |
Root's has 10 depth variables.
Size | Variable | Value |
---|---|---|
None | --ab-depth-none | none |
50 | --ab-depth-50 | 0px 0px 0px 1px rgba(0, 0, 0, 0.05); |
100 | --ab-depth-100 | 0px 1px 2px 0px rgba(0, 0, 0, 0.1); |
200 | --ab-depth-200 | 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 3px 0px rgba(0, 0, 0, 0.14); |
300 | --ab-depth-300 | 0px 2px 4px -1px rgba(0, 0, 0, 0.11), 0px 4px 6px -1px rgba(0, 0, 0, 0.15); |
400 | --ab-depth-400 | 0px 2px 10px -1px rgba(0, 0, 0, 0.11), 0px 10px 15px -3px rgba(0, 0, 0, 0.15); |
500 | --ab-depth-500 | 0px 10px 10px -5px rgba(0, 0, 0, 0.11), 0px 20px 25px -5px rgba(0, 0, 0, 0.15); |
600 | --ab-depth-600 | inset 0px 2px 4px 0px rgba(49, 39, 39, 0.06); |
Inner | --ab-depth-inner | 0px 25px 50px -12px rgba(41, 27, 27, 0.3); |
Outline | --ab-depth-outline | 0px 0px 0px 3px rgba(66, 153, 225, 0.5); |
The border variables can be applied to the border property like this: