sveltejs / sveltejs/kit

Allow playing transitions on initial render

Open
#2,759 22 comments 38 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation svelte
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the problem

In Svelte, you can play transitions on initial render by setting intro: true in the component constructor. There doesn't seem to be a way to do this in SvelteKit.

Describe the proposed solution

Add a setting in svelte.config.js that will set intro: true in the component constructor. This would only apply during the initial render. After client-side navigation, transitions should play automatically as components are mounted.

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the svelte.config.js setting described in the proposal and the Svelte component constructor documentation linked in the issue. Trace how the initial render is configured, then verify that the setting enables transitions only on the initial render while client-side navigation continues to play transitions automatically.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.