Skip to content

Add a component scope to transitions #8850

Open
@oodavid

Description

@oodavid

Describe the problem

It would be useful to have a component scope for transitions so that we can limit our transitions to the component.

This would let us be confident how a transition will behave without knowing anything about how the component is being used.

The issue with global scope is the behaviour depends on whether the component is inside a block or not.
With local scope, we cannot animate within nested blocks.

I've created a REPL playground:

https://svelte.dev/repl/30f6e9d08aa2466daab7eaa0f739076f?version=4.0.0

And recorded a short video explaining the idea / issue:

https://www.loom.com/share/a25fc70f3987474ea3fbe647e1716a10

Describe the proposed solution

Adding transition:slide|component that limits the scope of transitions to the current component.

Alternatives considered

None

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions