You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CSS Modules + ReactCSSTransitionGroup in React 0.14 #84
Reacted by Trent Boyd, mpyw, Ehsan Khakifirooz, Peter Miles, Mandar Athavale, Alexander Almström, Gabriel Katz, David Galindo, cha!, Pablo Jorge Andres and 9 more
This worked yet it is global scope so that transitionName should not be too simple.
Reacted by Konstantinos Stratis, James Please, Linder Wang, Simone Bembi, Adrian Miranda, Oleg, Jeremy Stocker, muzhou, Pablo Jorge Andres, DaFunkyAlex and 2 more
Has anyone managed to do this without having transition name specified :global namespace?
Reacted by nobody, Tung Dang, Vitali Zaidman, James Chalmers, Idan Gozlan, Vincent Orback, Richard Lopes, Austin O'Boyle, David Galindo, Craig Walker and 2 more
Reacted by Petr Petrov, Poplar-hills, Petar Bojinov, Erick Jones, Myles Gearon, Andrey Efremov, Tim Ramage, Seoyoung Jeong, Steven MacCoun, Andrej Badin and 71 more
Reacted by Poplar-hills, Erick Jones, Steven MacCoun, Preethi Kasireddy, Charlie Martin, Anup, Juryj Studziankow, Matt Swensen, Ahmed Mahmoud, Daisuke Kondo and 1 more
Reacted by sabari venkatesh and Jefferson Gouveia
Reacted by Erick Jones, Steven MacCoun, Preethi Kasireddy, Peter Asplund, Wasiq Kashkari, Anup, Juryj Studziankow, Aleksandr Panov, Matt Swensen, Diego Borges and 10 more
I found that I was getting an error that read: Uncaught Error: CSSCore.addClass takes only a single class name. "[object Object]-appear" contains multiple classes.
I noticed you didn't include the renaming of the "appear" class.
Any Update ? I was using CSSTransitions with Nextjs and CSS module . Cannot set enter style in module css . BUt it works in global.css , How can I do in css module .
Updat: Now I can set class like that -> Drawer_drawer___Ga5i-enter-done
But I can't set css in Drawer.module.css . How can I style ?
I have tried these and did not work.
.drawer-enterDone
and
.drawer-enter-done
Activity
markdalgleish commentedon Nov 12, 2015
The CSS should use camel case instead:
ArnoBuschmann commentedon Nov 12, 2015
Thanks Mark for your quick response. Good point. But hm, still not working, anything else I can try?
ArnoBuschmann commentedon Nov 12, 2015
Maybe a problem with the webpack configuration?
loader: 'style!css?modules&localIdentName=[name]---[local]---[hash:base64:5]!postcss'ArnoBuschmann commentedon Nov 12, 2015
Ok, seems the effect was just not obvious now, changing the timeouts from
<CSSTransitionGroup transitionAppear={true} transitionAppearTimeout={500} transitionEnterTimeout={500} transitionLeaveTimeout={300} transitionName={styles}>to
<CSSTransitionGroup transitionAppear={true} transitionAppearTimeout={2000} transitionEnterTimeout={2000} transitionLeaveTimeout={2000} transitionName={styles}>finally did the trick.
shogochiai commentedon Feb 25, 2016
I was also same situation and I solved by :global scope ()
This worked yet it is global scope so that transitionName should not be too simple.
Andreyco commentedon May 2, 2016
Has anyone managed to do this without having transition name specified
:globalnamespace?OttlikG commentedon May 7, 2016
As you saw in the first example, you can do with this technique:
https://facebook.github.io/react/docs/animation.html#custom-classes
Just apply the imported object to the transitionName property:
elrumordelaluz commentedon Jun 17, 2016
@Andreyco I solved specifying the
transitionNameObject prop. Something like:and in
Styles.css:SimoNonnis commentedon Aug 16, 2016
Does anyone managed to make react-addons-css-transition-group works with css-modules?
Tried all the solution above with no luck.
amilajack commentedon Aug 27, 2016
@markdalgleish Please update your answer, as camel casing has been deprecated in favor of
kebab-caseThis is the example taken from the docs:
amilajack commentedon Aug 27, 2016
@SimoNonnis check if your css animation duration lasts as long as your
transitionLeaveTimeoutandtransitionEnterTimeoutdurations.iam-peekay commentedon Sep 1, 2016
@elrumordelaluz thank you! worked like a charm.
dace commentedon Oct 20, 2016
Using version 15.3.2, when I would pass in an object, like so:
I found that I was getting an error that read:
So I had to pass my css into my ReactCSSTransitionGroupName as such - as just the imported name that points to my css file. This worked for me:
Login.js Component
transitions.css
The classes only seemed to work if they were camel-cased (could not get working in kebab-case). Hope this helps.
reznord commentedon Dec 1, 2016
@elrumordelaluz thanks a ton !! works perfect
reznord commentedon Dec 20, 2016
@elrumordelaluz have you implemented page transition? If so, can you show a gist how did you do that?
elrumordelaluz commentedon Dec 20, 2016
@reznord didn't implemented, could not work the same way?
reznord commentedon Dec 20, 2016
@elrumordelaluz Regarding the page transitions, I did a bit of homework and implemented it.
and this is what I did in
animate.css:but the leave animation is not working for some reason !!
alisonailea commentedon Apr 22, 2017
@hidace
have you tried something like this?
daise commentedon Apr 29, 2017
i got the same issue @reznord mentioned, any idea to make leave transition work?
Please let me know.
willowcheng commentedon Jun 8, 2017
To get rid of camel case CSS selectors, I find it also works by
loukitzanna commentedon Jan 17, 2018
If you're having the same issue as @reznord and @daise it was
exitnotleavefor methanhtutzaw commentedon Feb 17, 2023
Any Update ? I was using CSSTransitions with Nextjs and CSS module . Cannot set enter style in module css . BUt it works in global.css , How can I do in css module .
Updat: Now I can set class like that -> Drawer_drawer___Ga5i-enter-done
But I can't set css in Drawer.module.css . How can I style ?
I have tried these and did not work.
.drawer-enterDone
and
.drawer-enter-done
thanhtutzaw commentedon Feb 18, 2023
This doesn't work in 2023 . Doc and Example are not enough .
Now enterDone (camel case only work for me )
BloqX3 commentedon Sep 29, 2024
i'm using
"react-transition-group": "^4.4.5", the following configuration worked for me: