@maxigarcia/view-transitions
v0.9.0
Published
Lightweight, CSS-first transitions powered by the View Transitions API. Circular, sweep, fall, and page turn animations.
Maintainers
Readme
@maxigarcia/view-transitions
Lightweight, CSS-first transitions for the web. Wrap a DOM update in the View Transitions API and reveal the change with a circular, sweep, fall, or page turn animation—no animation framework required.
Install
npm install @maxigarcia/view-transitionsAnimations
| Technique | Docs | | --------------- | ---------------------------------------------------------------- | | Circular reveal | src/circular-reveal/README.md | | Sweep reveal | src/sweep-reveal/README.md | | Fall | src/fall/README.md | | Page turn | src/page-turn/README.md |
Each module has its own README with setup, API, and usage examples.
Package exports
| Import | Purpose |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| @maxigarcia/view-transitions | onCircularRevealAnimation, onSweepRevealAnimation, onFallAnimation, onPageTurnAnimation, types |
| @maxigarcia/view-transitions/page-turn.css | Styles for page turn |
| @maxigarcia/view-transitions/circular-reveal.css | Styles for circular reveal |
| @maxigarcia/view-transitions/fall.css | Styles for fall |
| @maxigarcia/view-transitions/sweep-reveal.css | Styles for sweep reveal |
Live demo
Go to the demo
# from monorepo root
npm install
npm run devDevelopment
From the monorepo root:
npm run build -w @maxigarcia/view-transitions
# or: nx run @maxigarcia/view-transitions:build
npm run lint -w @maxigarcia/view-transitionsBrowser support
Requires View Transitions for animated reveals. Unsupported browsers still run your update callback without animation.
