0

I followed the tutorial here and it works. How do I change the css to get slide in (when enter) and slide out (when leave).

Currently the css is like this:

.item-enter {
  opacity: 0;
}
.item-enter-active {
  opacity: 1;
  transition: opacity 500ms ease-in;
}
.item-exit {
  opacity: 1;
}
.item-exit-active {
  opacity: 0;
  transition: opacity 500ms ease-in;
}
Joshua Augustinus
  • 1,468
  • 3
  • 15
  • 28

1 Answers1

0
.item-enter {
  transform: translateX(100%);
}
.item-enter-active {
  transform: translateX(0%);
  transition: transform 500ms ease-in-out;
}
.item-exit {
  transform: translateX(0%);
}
.item-exit-active {
  transform: translateX(100%);
  transition: transform 500ms ease-in-out;
}

Joshua Augustinus
  • 1,468
  • 3
  • 15
  • 28