Skip to content
Discussion options

You must be logged in to vote

We've just released swup 4 which supports dynamically setting the containers to replace. If you combine this with the Route Name Plugin, you can define URL groups and create custom logic for visits between certain routes:

swup.hooks.on('visit:start', (visit) => {
  if (visit.to.route !== visit.from.route) {
    visitit.containers = ['#custom'];
  }
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by daun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants