Giter Site home page Giter Site logo

Comments (5)

PeterKottas avatar PeterKottas commented on May 25, 2024 1

It would require fairly minimal code, just some extra loop based on check if the param is array or string here https://github.com/dennismorello/react-awesome-reveal/blob/master/src/Reveal.tsx#L37

from react-awesome-reveal.

morellodev avatar morellodev commented on May 25, 2024 1

Hey, I'm not sure if anyone's still looking for how to do this, but I found out that when I use Fade and provide a direction prop, the animation does indeed combine a Slide and a Fade.

 <Fade cascade damping={0.1} triggerOnce direction={"right"}>
...
</Fade>

Slide_Fade

This is how the Fade animation with a direction is intended to work. You can use the Slide animation if you do not want the fade effect.

from react-awesome-reveal.

morellodev avatar morellodev commented on May 25, 2024

Hi @PeterKottas,

it sounds like something you can already do by combining different effects and playing with the delay prop.

If this is enough I would not add levels of complexity to react-awesome-reveal, I would keep it simple ;)

from react-awesome-reveal.

PeterKottas avatar PeterKottas commented on May 25, 2024

I sort of agree, but still think it might be a tempting feature. You can do it by manually looping over children in your code. Needless to say, not a very user-friendly way of doing things. I am thinking this could be implemented in a pretty straight forward way. I can imagine something like this.

import { Reveal } from 'react-awesome-reveal';

const MyComponent = () => {
  return <Reveal cascade={true} animation={['fade', 'slide']}><div>1</div><div>2</div></Reveal>;
};

That would simply chain the reveals. This could easily work with cascade as well. Maybe it would make sense to keep this open as a "help-wanted" issue? See if others might be interested in such functionality.

from react-awesome-reveal.

fikip avatar fikip commented on May 25, 2024

Hey, I'm not sure if anyone's still looking for how to do this, but I found out that when I use Fade and provide a direction prop, the animation does indeed combine a Slide and a Fade.

 <Fade cascade damping={0.1} triggerOnce direction={"right"}>
...
</Fade>

Slide_Fade

from react-awesome-reveal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.