Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Fade in on page load #7

Open
justinmoon opened this issue Jan 1, 2020 · 2 comments
Open

Question: Fade in on page load #7

justinmoon opened this issue Jan 1, 2020 · 2 comments

Comments

@justinmoon
Copy link

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.

@pngwn
Copy link
Owner

pngwn commented Jan 6, 2020

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.

@JHethDev
Copy link

@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
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants