Some Examples » 18. Page: Effects
18. Page: Effects
You can change how pages appear by passing a function to the Page component’s effect
property.
Code component
The function receives the current offset (as a normalizedOffset
inside info
) and should return values for the properties you want to transform (here: opacity
, scale
, and x
).
Pro tip: When using the <Page>
component in a React project (like in the CodeSandbox above), set the box-sizing
of all elements to border-box
. Like this, for instance:
<Page>
box-sizing
, CSS universal selector (*
)