One step of depth. The system's only expression of depth, measured in CIE L* off rendered pixels rather than chosen by eye.
Nest it and each child steps down on its own, so a panel does not have to know where it sits. The cap at 2 is deliberate and warns instead of failing: a fourth stratum usually means the content wants restructuring, not another shade, and crashing a page over it would be worse than the flaw.
import { Layer } from '@redrob-labs/ui';
| Prop | Type | Notes |
|---|---|---|
depth |
number |
Force a depth instead of taking one from the parent. 0 base, 1 raised, 2 sunken. Anything above 2 is held at 2 and warned about. |
as |
keyof React.JSX.IntrinsicElements |
The element to render. section or article when the layer is also a document landmark. |
id |
string |
|
className |
string |
|
children |
React.ReactNode |