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

Feature request - extend animation #59

Open
bovas85 opened this issue Jan 2, 2019 · 3 comments
Open

Feature request - extend animation #59

bovas85 opened this issue Jan 2, 2019 · 3 comments

Comments

@bovas85
Copy link

bovas85 commented Jan 2, 2019

Extend elements so they take props like eyes, mouth and nose in order to extend animations to control each element more accurately.

I suppose using a className to target each element works, but it's not declarative nor dynamic.

What do you think?

Apologies if this is already implemented but I couldn't find any documentation on how to animate and the cds link is broken

@miukimiu
Copy link
Owner

miukimiu commented Jan 2, 2019

Hi,

Right now, the only way of creating an animation is to target elements and animate with CSS or an animation library:

https://codesandbox.io/s/72qjwqwlo0

What you are suggesting is to have some animations by default. Is that right?

For, instance something like:

<Planet mood="sad" eyes="blink" />

I think it's a good idea!

@phmatray
Copy link

I think the animation should be different depending on the mood of the avatar. An angry avatar will not be animated in the same way as a happy avatar.

Perhaps we could move on to a Boolean property?

<Planet mood="sad" animated />

@bovas85
Copy link
Author

bovas85 commented Feb 12, 2019

That's going to just apply transition on and off. My point for this is to allow controlling specific elements of the svg by exposing them via prosp. You can pass a specific function or class perhaps

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