lsirivong / gatsby-plugin-modal-routing

A gatsby plugin for routable modals
44 stars 30 forks source link

Transition between modals #49

Closed treechime closed 4 years ago

treechime commented 4 years ago

I'm working on a galleryesque site where you scroll down an index and open items that are pages that open as modals. The items have prev & next buttons (modal links) to go between items, and then a close button to return to the index.

I have transitions working between index <=> page as per React Modal's docs but is there a way I could have transitions from modal <=> modal?

Thanks in advance

stephanebruckert commented 4 years ago

Have a look at https://github.com/lsirivong/gatsbygram-with-gatsby-plugin-modal-routing/

treechime commented 4 years ago

Have a look at https://github.com/lsirivong/gatsbygram-with-gatsby-plugin-modal-routing/

Sorry, I meant CSS transitions. I guess that wasn't really clear. The initial modal fades in over the content with CSS transitions, but clicking on a link within the modal that also opens a modal just replaces the content, so there's no way to have a nice transition between the two.

lsirivong commented 4 years ago

Hi @treechime, I realize this is a delayed response (sorry for that!), but I think what you're asking for here is beyond the scope of what this plugin will be capable of in it's current state.

You might benefit from taking a look at the source code here, to see how I'm rendering the modals, and ripping out parts of that and putting it into your own app and integrating with an animation library or something like https://github.com/TylerBarnes/gatsby-plugin-transition-link

Good luck! Sorry I can't be of more help.