animation-play-state
utilities
#13774
Paillat-dev
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to propose adding utilities for the
animation-play-state
CSS property in Tailwind CSS. This would allow developers to easily control the playback state of animations without writing custom CSS.Suggested utilities (this is just an idea):
animation-running
: Setsanimation-play-state: running;
animation-pause
: Setsanimation-play-state: paused;
animation-inherit
: Setsanimation-play-state: inherit;
animation-initial
: Setsanimation-play-state: initial;
animation-revert
: Setsanimation-play-state: revert;
animation-revert-layer
: Setsanimation-play-state: revert-layer;
animation-none
: Setsanimation-play-state: unset;
These utilities would be particularly useful for controlling animations based on user interactions (e.g., pausing on hover) or application state (e.g., pausing during loading).
Example usage:
What do you think? This would enhance Tailwind's animation capabilities without adding much complexity.
For reference: https://developer.mozilla.org/en-US/docs/web/css/animation-play-state
Related to: #3654
Beta Was this translation helpful? Give feedback.
All reactions