Package detail

@vtbag/cam-shaft

vtbag53.1kISC1.0.6

The Cam-Shaft bumps your view transition images into place to avoid the pseudo-smooth-scroll effect when applying view transitions to elements that are taller than the viewport.

view, transitions, view-transition, view-transitions

readme

⭐️Please star to support this work⭐️

🐫 The Cam-Shaft

Cam-Shaft: Bump your view transition pseudo-elements into place to avoid that unexpected pseudo-smooth-scrolling effect.

Build Status npm version minzip NPM Downloads

The @vtbag website can be found at https://vtbag.dev/

!!! News !!!

The Cam-Shaft should now also work for browsers that support cross-document view transitions but have no support for the Navigation API (looking at you, Safari).

For details see the CHANGELOG

What is it?

When you assign a view-transition-name to an element that is larger than the viewport, the View Transition API adds a default animation to the ::view-transition-group() of the element that makes instant scrolling look like smooth scrolling. The Cam-Shaft bumps and nudges your view transition pseudo-elements back into place to avoid that pseudo-smooth-scrolling effect.

See the Cam-Shaft in action and see how it can be used in your own projects.

changelog

@vtbag/cam-shaft

1.0.6 - 2025-02-24

Patch Changes

  • 2c75692: Makes code more robust facing optional values.

1.0.5 - 2025-01-02

Patch Changes

  • 6fb7e14: Implements a workaround for a bug in Webkit where user agent animation have wrong names

1.0.4 - 2025-01-01

Patch Changes

  • 3e99b12: Fixes buggy session persistence

1.0.3 - 2024-12-13

Patch Changes

  • d1a91e2: Removes dependency on Navigation API

1.0.2 - 2024-12-12

Patch Changes

  • 46a8732: improving robustness

1.0.1 - 2024-10-17

Patch Changes

  • 35e430e: Updates dependencies
  • 0c1f959: Adds .d.ts declarations

1.0.0 - 2024-10-04

Major Changes

  • 1d33171: Initial revision