Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More β†’
Socket
Sign inDemoInstall
Socket

astro-vtbot

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astro-vtbot

The πŸ‘œ Bag of Tricks ✨ for Astro's View Transitions

  • 2.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

No, its NOT a roBOT πŸ€–, its a πŸ‘œ Bag of Tricks!✨

⭐️Please star to support this work⭐️

The Bag of Tricks for Astro's View Transitions

The bag of tricks provides extensions & support around Astro's view transitions.

npm version Socket Badge Build Status NPM Downloads

A current deployment of tech demos and the documentation can be found at https://events-3bg.pages.dev/

!!! NEW TRICKS ✨ IN THE BAG πŸ‘œ !!!

<InspectionChamber /> and <CamShaft />: Added a workaround to handle quoted animation names in Webkit which caused user agent animation names not being recognized in Safari.

Version 2.0.0 πŸŽ‰ of astro-vtbot is here!

The major release changes what is automatically installed if you install astro-vtbot as an Astro integration. Now installing as an integration using astro add astro-vtbot should be your default choice for installing astro-vtbot. This gives you access to the inspection-chamber on every page via Astro's devToolbar!

In contrast, <LoadingIndicator /> and the <Linter /> components will no longer be automatically integrated and must be explicitly added if needed, e.g. in a global Layout.astro. During a transition period, the previous behavior can still be restored using toggles in the astro.config file.

For details, see the CHANGELOG.

On the plus side: There’s an exciting new mode in the <TurnSignal /> component! It allows for view transition types on a per-link basis! For further information see these demos: blog demo, @vtbag image viewer demo and the @vtbag fishpond demo.

Recently Learned Tricks

Safari supports cross-document view transitions and the <ElementCrossing /> component of astro-vtbot learned how to work with Safari.
For details see the Changelog of @vtbag/element-crossing

The recent changes to <CamShaft /> introduced a bug, which has now been fixed.

The Inspection Chamber DevTools now also work for pnpm projects!
Big shout out and "Thank You!" to Lukas for providing this fix!

Reusable Components 🧩

  • In need for extensions for view transitions because you have issues with iframes on your pages?
  • Wanting support in understanding and debugging view transitions or simply want a second pair of eyes πŸ‘€ on your view transition settings?
  • Looking for reusable animations or special transition effects?
  • Want to use view transitions on your Starlight site?

The astro-vtbotpackage isn't a monolithic library. Use the components you need and only pay bandwidth for those.

ComponentBrotli bytes added
Animation Style ✨~0.1k
AutoNameSelected πŸ“›~0.3k
BorderControl πŸ›‚~0.1k
BrakePad πŸ¦₯~0.2k
CamShaft 🐫~0.6k
ElementCrossing 🚸~1.2K
InspectionChamber πŸ”¬~27k
Linter 🧹~1.9k
LoadingIndicator ⏳~0.4k
Move 🚟~0.2k
NoScroll πŸ“œ~0.1k
PageOffset πŸ“„β‡ž~0.1k
PointerOnNavigation πŸ‘†~0.1k
Portal πŸšͺ~0.2k
ReplacementSwap β†Ή~0.5k
Starlight … 🌟~3.0k
SwapSound πŸ”Š-0.3k
Swing 🎷~0.1k
TurnSignal πŸ”™~0.5k
VtBotDebug πŸ›~2.8k
Zoom πŸ”Ž~0.1k

Visit the documentation of the reusable components for detailed information.

  • <Linter/>: A linter component that helps you identify problems when setting up transitions.

  • <VtBotDebug/>: A Debugging component that logs the events and their data as they occur.

  • <ReplacementSwap/>: An alterantive DOM swap(), which preserves elements in the original DOM to avoid reinitialization of iframes or CSS animations.

  • <LoadIndicator>: Have you ever missed the visual feedback on sites with view transitions as to whether the app has noticed the click? You need a loading indicator! Here you go!

  • Zoom, <Move> and Swing animations and the <AnimationsStyle/> component allows for extended styling options.

  • <Portal/> component that forces all view transitions through a portal/loading page.

  • <NoScroll/> keep the current vertical and horizontal scroll position when transitioning to the next page.

Tech Demos πŸ”₯

The bag of tricks currently contains several technical demos that show examples of the implementation of various effects using the view transition events.

The sources are in this repository.

The Jotter πŸ““

Last but not least, the deployment also includes the β–Ά Jotter β—€ with a wealth of information on transition events as well as background information and valuable tips & tricks on view transitions in Astro.

Some of the contents are technical demos, some are useful tools, and some are reusable components that you can use in your own project to handle edge cases that go beyond Astro's standard features.

Troubleshooting

For help, check out the Discussions tab on the GitHub repo.

Contributing

This package is maintained by martrapp independently from Astro. You're welcome to contribute by submitting an issue or opening a PR!

Changelog

See CHANGELOG.md for a history of changes to this package.

Keywords

FAQs

Package last updated on 02 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc