Skip to content

IconButton transitions #142

@Vehmloewff

Description

@Vehmloewff

It would be nice if there was a way to have transitions when an icon changes in IconButton.

This would be key to doing that: https://svelte.dev/examples#transition-events.

We could just add another prop:

<IconButton
    icon={[
        { name: 'favorite' },
        { name: 'favorite_outline' }
    ]}
    transition="scale"
    bind:on
/>

Then, every time on is toggled, the old icon will animate out with a scale transition, and the new one will animate it with a scale.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature request that is not a new component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions