Surfacesstable
Gnomon
Pointer light and shadows
The pointer becomes a lamp, and everything inside casts a shadow away from it.
Alpha
Beta
Gamma
Customize
Lightthe pointer is the lamp; the shadows fall away from it
28 px
distance30 px
softness0.55
depthcolorliftUsage
import { Gnomon } from "zerogravity/gnomon"
<Gnomon>
<Card />
</Gnomon>Generated from the controls above. Only props that differ from their defaults are shown.
Props
| Property | Type | Default | Description |
|---|---|---|---|
distance | number | 28 | Throw. Range 0 to 80 px. |
softness | number | 30 | Softness. Range 0 to 80 px. |
depth | number | 0.55 | Depth. Range 0 to 1. |
color | string | "#05070f" | Shadow. |
lift | boolean | true | Lift toward the light. |
children | ReactNode | — | Each direct child casts its own shadow. |
disabled | boolean | false | Pins the light where it started. |
respectReducedMotion | boolean | true | Holds the light at rest when the user asks for less motion. |
Dependencies
0 external runtime dependencies
Ships with nothing but React.