lwc icon indicating copy to clipboard operation
lwc copied to clipboard

Transition / Animation system

Open lbineau opened this issue 4 years ago • 10 comments

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.

  • https://vuejs.org/v2/guide/transitions.html#Transitioning-Single-Elements-Components
  • https://fr.reactjs.org/docs/animation.html
  • https://angular.io/guide/transition-and-triggers
  • https://svelte.dev/docs#transition_fn

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.

lbineau avatar Jan 29 '20 08:01 lbineau

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

caridy avatar Jan 29 '20 15:01 caridy

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

git2gus[bot] avatar Jan 29 '20 15:01 git2gus[bot]

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

git2gus[bot] avatar Jan 29 '20 15:01 git2gus[bot]

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

git2gus[bot] avatar Feb 04 '20 04:02 git2gus[bot]

Any news regarding this work item?

lbineau avatar Mar 12 '20 14:03 lbineau

@Gr8Gatsby

caridy avatar Mar 18 '20 16:03 caridy

would be great to see this

dakotalim54 avatar Aug 26 '20 23:08 dakotalim54

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

lukethacoder avatar Aug 27 '20 13:08 lukethacoder

Did you find a way to use GSAP with LWC?

chrisureza avatar Jan 17 '22 16:01 chrisureza

@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) {
...

lukethacoder avatar Jan 23 '22 00:01 lukethacoder

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

tom5491 avatar Jun 29 '23 16:06 tom5491

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

nolanlawson avatar Jun 29 '23 16:06 nolanlawson