Skip to content
TrademarkTrademark
Docs
Components

Mask

Updated: May 8, 2025
View on GitHub

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).

Feather

Use the feather prop to set how much of the radius the edge fades over, from 0 (a sharp circle) to 100 (a soft fade from the centre, the default).

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

Type
Default
cursor
booleanfalse
x
number—
y
number—
radius
number50
feather
How much of the radius the edge fades over, from 0 (a sharp circle) to 100 (soft from the centre).
number100
reducedMotion
Controls motion reduction for cursor tracking. Auto detects device capability and prefers-reduced-motion.
booleanauto
auto
className
string—
style
React.CSSProperties—
children
React.ReactNode—
…and every FlexProps propinherited—
Edit this page on GitHub