2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Components

Mask

Updated: May 8, 2025
View on GitHub
The Mask component provides a customizable radial mask effect. Use the x and y props to position the mask. The coordinates are relative to the parent element. Use the radius prop to set the radius of the mask (defined in vh - viewport height). Use the cursor prop to enable cursor tracking reveal. The Mask component extends the Flex component, so you can use all the props of Flex. 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.
Prop
Type
Default
cursor
booleanfalse
x
number
y
number
radius
number50
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
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club