Skip to content
Văn Hải Sơn

Motion · 19 effects

Motion effects

What makes a page feel alive: things that arrive as you scroll, move with the scroll or answer the pointer. Each one is live; replay it, then name its code with the patterns.

Six rules for good motion

  1. 01

    Subtle

    16–32 px of travel, 0.5–0.8 s, ease-out. Long trips and bounces look cheap.

  2. 02

    One language per page

    One main effect for everything, one or two accents for what matters.

  3. 03

    Once

    An element arrives once. Replaying it every time you scroll back tires the eye.

  4. 04

    Never the first screen

    The hero and its photo appear at once: animating them slows the page down for Google.

  5. 05

    Content first

    The text is in the page before any script runs: without JavaScript, nothing is hidden.

  6. 06

    Respect the setting

    Visitors who ask their system for less motion get a still page.

01

On scroll into view

Plays once, when the element comes into view. Scroll down to see them arrive, or press Replay.

M1Entrance

Fade up

Fades in while rising a little. The default for headings, text and buttons; a short delay between them.

In code

<Reveal>…</Reveal>

Goes with: S1, S11, S17

Day spa

A quiet hour, just for you

Hot stones, herbal steam and a cup of tea, in the old town.

Book a treatment

M2Entrance

Fade from the side

Slides in from the left or the right. In zig-zag rows, the photo from one side and the words from the other.

In code

<Reveal effect="fade-left">…</Reveal>

Goes with: S2, H2

Rice first

Our chef seasons the rice by hand, every hour, before a single piece of fish is cut.

M3Entrance

Zoom in

Grows from slightly smaller while fading in. For cards and tiles you want noticed.

In code

<Reveal effect="zoom">…</Reveal>

Goes with: S4, S13

  • Relax

    450k

  • Signature

    790k

  • Retreat

    1.2M

M4Entrance

Stagger

The items of a grid arrive one after another, 80–120 ms apart, instead of all at once.

In code

<Reveal as="ul" stagger={0.1}>…</Reveal>

Goes with: S1, S6, S10, S17

  • Blush roses

  • Sunflower joy

  • Lavender vase

  • Red tulips

M5Entrance

Blur in

Comes into focus from a soft blur. Elegant on large photos and calm headlines.

In code

<Reveal effect="blur" duration={0.9}>…</Reveal>

Goes with: S11, Luxury / elegant

Slow down. Breathe.

M6Entrance

Clip reveal

The photo is uncovered like a curtain being drawn. Editorial and luxury pages.

In code

<Reveal effect="clip" duration={1.1}>…</Reveal>

Goes with: S2, Editorial / magazine

— The cellar, thirteen degrees all year

M7Entrance

Split text

The words of a big headline rise one by one out of their line.

In code

<RevealText as="h2" text={title} />

Goes with: H6, Bold / brutalist, Editorial / magazine

Websites that move people

M8Entrance

Counter

Numbers count up from zero when they come into view.

In code

<CountUp value={5000} locale={intl} />

Goes with: S3

years open
12
happy guests
5,000
average rating
4.9

M9Entrance

Draw line

A line draws itself from left to right: timelines, dividers, underlines.

In code

<Reveal effect="draw"><hr /></Reveal>

Goes with: S9, Luxury / elegant

  1. 1

    Book

  2. 2

    Drop off

  3. 3

    We clean

  4. 4

    Delivered

02

Linked to the scroll

Follows the scroll bar instead of a clock: scroll inside each frame, forward and back.

M10Scroll-linked

Parallax

The photo moves slower than the page, which gives depth.

In code

className="scroll-parallax"

Goes with: H7, S11

Scroll inside the frame

Four hundred labels, kept at thirteen degrees. ↓

Since 1987

Tastings every Saturday at five.

M11Scroll-linked

Scale on scroll

A photo grows to full size and loses its rounded corners as you scroll to it.

In code

className="scroll-zoom"

Goes with: S13, S2

Scroll inside the frame

The pool opens at six. ↓

Sunset from the water

Towels and drinks by the loungers.

M12Scroll-linked

Reading progress

A thin bar at the top fills as the page is read.

In code

className="scroll-progress"

Goes with: S17

Scroll inside the frame

Five caves worth the kayak

The bay has more than a thousand islands, and most of them hide something: a beach at low tide, a lagoon, a cave you can only reach by paddling.

Leave early. Before nine the water is flat and the big boats are still at the pier, so you have the caves to yourself.

Bring a dry bag, a head torch and water. The guides know which caves are open at which tide; ask them the evening before.

The last one is the best: a tunnel under the rock that opens into a round lagoon, silent except for the birds.

M13Scroll-linked

Horizontal scroll

You scroll down, the row moves sideways: tours by day, a gallery, a timeline.

In code

className="scroll-horizontal" + "scroll-horizontal-track"

Goes with: S7, S14

Scroll inside the frame
  • Day 1 · The bay
  • Day 2 · The villa
  • Day 3 · The caves
  • Day 4 · The market
  • Day 5 · The table

M14Scroll-linked

Shrinking header

The header gets slimmer and gains a shadow once you start scrolling.

In code

className="scroll-shrink"

Goes with: Any page

Scroll inside the frame
Lantern HouseBook

Scroll: the header gets slimmer and casts a shadow.

03

On hover

Answers the pointer, and the keyboard focus: the small details that make a page feel polished.

M15Hover

Image zoom on hover

The photo zooms slowly inside its frame. Product cards, galleries, articles.

In code

group-hover:scale-110 transition-transform duration-700

Goes with: S6, S7, S17

Hover, or reach it with Tab
  • Hot stones

  • Herbal steam

  • Brightening facial

M16Hover

Card lift

The card rises a few pixels with a deeper shadow: it says “click me”.

In code

hover:-translate-y-1.5 hover:shadow-xl transition

Goes with: S1, S4, S10

Hover, or reach it with Tab
  • Hot stones

  • Herbal steam

  • Brightening facial

M17Hover

Button shine and fill

A light sweeps across the button, or its colour fills from the left.

In code

before:… hover:before:translate-x-full (shine)

Goes with: S11, H1

Hover, or reach it with Tab

M19Hover

3D tilt

The card tilts towards the pointer with a soft light. One product, one offer.

In code

<Tilt>…</Tilt>

Goes with: H8, S6

Hover, or reach it with Tab

Cabernet Reserve 2019

1,250,000 ₫

Photos generated with AI. Every effect stops for visitors who prefer reduced motion (a system setting).