svelte-travel-transitions
svelte-travel-transitions copied to clipboard
Question: Fade in on page load
Is it possible to fade in content on page load?
I've tried stuff like this and it doesn't seem to work in Sapper.
I'm not sure if this is possible with sapper. With svelte you need to set intro: true
when you initialise your application but I'm not 100% certain you have full access to the init options when using sapper. In svelte you would do something like:
new App({ target: some_el, intro: true })
This will enable transitions on the first load, I'll have to check this behaviour for sapper.
@justinmoon Sapper is a little different you need to look for the app.mjs file (src/node_modules/@sapper for me) and add intro: true to root_component since that's what's calling new App()
root_component = new App({
target,
props,
hydrate: true,
intro: true
});