Skip to content

IconButton transitions #142

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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