The Mask component provides a customizable radial mask effect.
Coordinates
Use the x and y props to position the mask. The coordinates are relative to the parent element.
Radius
Use the radius prop to set the radius of the mask (defined in vh - viewport height).
Cursor
Use the cursor prop to enable cursor tracking reveal.
Flex
The Mask component extends the Flex component, so you can use all the props of Flex.
Performance
When cursor is enabled, Mask automatically detects low-end devices and the prefers-reduced-motion system setting. When either is detected, cursor tracking is disabled and the mask remains at its initial position. The cursor effect also pauses when the element is outside the viewport. You can override this with the reducedMotion prop.See useReducedMotion for details.
API reference
Prop
Type
Default
cursor
boolean
false
x
number
—
y
number
—
radius
number
50
reducedMotion
Controls motion reduction for cursor tracking. Auto detects device capability and prefers-reduced-motion.