salesforce / lwc

⚡️ LWC - A Blazing Fast, Enterprise-Grade Web Components Foundation
https://lwc.dev
Other
1.61k stars 395 forks source link

Transition / Animation system #1699

Open lbineau opened 4 years ago

lbineau commented 4 years ago

Is your feature request related to a problem? Please describe. I did not find any documentation about a transition / animation system (CSS or JS).

Describe the solution you'd like I think LWC should have a built-in transition / animation system like any other modern frontend framework.

Additional context I believe transitions and animations are an essential part of any modern UI library and imo it should be good to have such component in LWC.

caridy commented 4 years ago

@Gr8Gatsby can you add this to the things to be discussed at some point?

git2gus[bot] commented 4 years ago

This issue has been linked to a new work item: W-7165847

git2gus[bot] commented 4 years ago

This issue has been linked to a new work item: W-7165847

git2gus[bot] commented 4 years ago

This issue has been linked to a new work item: W-7165847

lbineau commented 4 years ago

Any news regarding this work item?

caridy commented 4 years ago

@Gr8Gatsby

dakotalim54 commented 4 years ago

would be great to see this

lukethacoder commented 4 years ago

Are there any 3rd party packages (three.js, anime.js, gsap, popmotion etc.) that work well with LWC (and get past locker service)?

chrisureza commented 2 years ago

Did you find a way to use GSAP with LWC?

lukethacoder commented 2 years ago

@chrisureza I did manage to get GSAP working within LWC awhile back. Had to poke around in the minified js output. Not too sure if the same still holds up but the below works as of gsap v3.5.1.

should be able to just drop the window = window and instead return self.

// before
;(function(global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined'
    ? factory(exports)
    : typeof define === 'function' && define.amd
    ? define(['exports'], factory)
    : ((global = global || self), factory(window = window || {})) // THIS LINE
})(this, function(exports) {
...

// after
;(function(global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined'
    ? factory(exports)
    : typeof define === 'function' && define.amd
    ? define(['exports'], factory)
    : ((global = global || self), factory(self)) // THIS LINE
})(this, function(exports) {
...
tom5491 commented 1 year ago

Animation libraries also don't seem to work when having LWS enabled...

nolanlawson commented 1 year ago

@tom5491 Do you have an example of an animation library that fails with LWS? Do you have a reproducible test? (See LWS Console.)