@oglofus/tailwind-viewport-animations demo

npm package
fade / default

va-fade

va-start-10 va-end-55

slide up

va-slide-up

va-distance-140

arbitrary ranges

va-zoom

va-start-[70%] va-end-[15%] va-duration-900

New animation variants

blur in

va-blur-in

rotate in

va-rotate-in

pop

va-pop

reveal up

va-reveal-up

flip y

va-flip-y va-ease-snap

custom distance

va-slide-right va-distance-[20vh]

Duration and ease controls

quick

va-duration-400 va-ease-out

slow smooth

va-duration-1200 va-ease-smooth

arbitrary

va-duration-[1.6s] va-ease-[cubic-bezier(...)]

Named container targets

Use va-group-[name] on a scrollable parent and connect children with va-target-[name] or va-subject-[name].

same element as subject and target

Scroll inside the panel

Each card uses va-target-[cards], so its own view progress inside this container drives the animation.

card a

va-group-[cards] + va-target-[cards]

card b

Same named container timeline

card c

Each card tracks itself

separate subject and target

One element drives another

The dashed marker is the named subject. The card below animates from that same timeline.

The marker below becomes the named subject for the card that follows.
Named subject: va-subject-[hero]
target card

va-target-[hero] using the subject's view timeline

Keep scrolling inside the container to replay the relationship.
The added travel distance makes the subject and target relationship easier to read.

Iteration behavior

run once

va-once

repeat

va-repeat