marquee icon indicating copy to clipboard operation
marquee copied to clipboard

add more directions and delay to marquee

Open fobos531 opened this issue 2 years ago • 3 comments

Hey @catalinmiron

This library is great, thanks for open-sourcing it! I wanted to contribute back by providing a super simple adaptation of your code to also support vertical marquee, along with additional directions like in the HTML marquee, since I've seen myself needing this recently. I also added a delay prop if people want to delay starting the animation.

Quick demo (over 10MB):

https://share.cleanshot.com/lgcYtj3J

Code used for the demo:

<View>
        <View style={{ flexDirection: 'row', columnGap: 20 }}>
          <Marquee spacing={8} speed={1} direction="up" delay={200}>
            {images.map((image, index) => (
              <View key={index}>
                <Image key={index} source={{ uri: image }} style={{ width: 100, height: 100 }} />
                {index !== images.length - 1 && <Space height={8} />}
              </View>
            ))}
          </Marquee>

          <Marquee spacing={8} speed={1} direction="down" delay={800}>
            {images.map((image, index) => (
              <View key={index}>
                <Image key={index} source={{ uri: image }} style={{ width: 100, height: 100 }} />
                {index !== images.length - 1 && <Space height={8} />}
              </View>
            ))}
          </Marquee>

          <Marquee spacing={8} speed={1} direction="up" delay={1400}>
            {images.map((image, index) => (
              <View key={index}>
                <Image key={index} source={{ uri: image }} style={{ width: 100, height: 100 }} />
                {index !== images.length - 1 && <Space height={8} />}
              </View>
            ))}
          </Marquee>
        </View>

        <Marquee spacing={8} speed={1} direction="right">
          <Text>The quick brown fox jumps over the lazy dog.</Text>
        </Marquee>

        <View style={{ height: 10 }} />

        <Marquee spacing={8} speed={1} direction="left">
          <Text>The quick brown fox jumps over the lazy dog.</Text>
        </Marquee>
      </View>

The PR changes just the source code of the component, nothing else in the library. If there's any other "housekeeping" stuff needed to support this properly, let me know!

fobos531 avatar Nov 22 '23 14:11 fobos531

I tried works perfect. thanks. @fobos531

ramazanarslan avatar Dec 10 '23 22:12 ramazanarslan

Good day,

@catalinmiron can this be merged, please?

Code-Victor avatar Jun 10 '24 13:06 Code-Victor

Good day,

@catalinmiron can this be merged, please?

@catalinmiron hi, I'm a subscriber to AnimateReactNative and love the product. Would you happen to consider merging this PR? Would love for the vertical marquee direction.

Thanks!

thianphat avatar Jul 04 '24 00:07 thianphat

Hey, any updates on the requested changes?

m8tec avatar Nov 05 '24 11:11 m8tec

This was released in 0.3.0-0.3.1. Support for direction and reverse

catalinmiron avatar Nov 08 '24 14:11 catalinmiron