- Docs
- Components
- UI & Cards
- Scroll Mask
Scroll Mask
Scroll opens a mask that reveals an image six ways
Customize
Props
22| Name | Type | Default | Description |
|---|---|---|---|
variant | "iris" | "wipe" | "curtain" | "slats" | "grid" | "type" | "iris" | Which mask geometry drives the reveal. |
src | string | Unsplash sample | Image revealed through the mask. |
alt | string | "" | Alternative text for the image. |
word | string | "SCROLL" | Word carved out of the frame in the type variant. |
scrollLength | number | 1.7 | Scroll runway beyond the pinned viewport, in viewport heights. |
settle | number | 0.84 | Fraction of the runway after which the reveal has fully opened. |
smooth | number | 0.14 | Follow damping applied to the scroll position. 0 snaps instantly. |
feather | number | 14 | Edge softness of the mask, as a percentage of the frame. |
stagger | number | 0.55 | Delay spread across pieces. 0 fires them together. |
columns | number | 9 | Strip count for slats, column count for grid. |
originX | number | 50 | Horizontal anchor of the reveal, as a percentage. |
originY | number | 50 | Vertical anchor of the reveal, as a percentage. |
angle | number | 108 | Sweep direction of the wipe variant, in degrees. |
zoom | number | 1.14 | Scale the image starts at before settling back to 1. |
fit | "cover" | "contain" | "cover" | How the image fills the frame. |
radius | number | 18 | Corner radius of the frame, in pixels. |
overlay | number | 0 | Opacity of the scrim laid over the image. |
background | string | "transparent" | Colour behind the frame. |
revealContent | boolean | true | Fade children in as the reveal completes. |
calm | boolean | false | Hold the reveal steady instead of damping toward it. |
children | ReactNode | undefined | Content layered over the frame. |
className | string | "" | Extra classes for the outer section. |
variant"iris" | "wipe" | "curtain" | "slats" | "grid" | "type"Which mask geometry drives the reveal.
"iris"srcstringImage revealed through the mask.
Unsplash samplealtstringAlternative text for the image.
""wordstringWord carved out of the frame in the type variant.
"SCROLL"scrollLengthnumberScroll runway beyond the pinned viewport, in viewport heights.
1.7settlenumberFraction of the runway after which the reveal has fully opened.
0.84smoothnumberFollow damping applied to the scroll position. 0 snaps instantly.
0.14feathernumberEdge softness of the mask, as a percentage of the frame.
14staggernumberDelay spread across pieces. 0 fires them together.
0.55columnsnumberStrip count for slats, column count for grid.
9originXnumberHorizontal anchor of the reveal, as a percentage.
50originYnumberVertical anchor of the reveal, as a percentage.
50anglenumberSweep direction of the wipe variant, in degrees.
108zoomnumberScale the image starts at before settling back to 1.
1.14fit"cover" | "contain"How the image fills the frame.
"cover"radiusnumberCorner radius of the frame, in pixels.
18overlaynumberOpacity of the scrim laid over the image.
0backgroundstringColour behind the frame.
"transparent"revealContentbooleanFade children in as the reveal completes.
truecalmbooleanHold the reveal steady instead of damping toward it.
falsechildrenReactNodeContent layered over the frame.
undefinedclassNamestringExtra classes for the outer section.
""