0.1.6 • Published 10 months ago

rn-animated-wave v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

rn-animated-wave

Animated rings component for React Native

Made by DannyGlade

Demo

https://github.com/user-attachments/assets/642adbb9-2c81-4434-ad70-c7e26dccb043

Installation

please install react-native-reanimated to use this package.

npm install react-native-reanimated

OR if using expo

npx expo install react-native-reanimated

npm install rn-animated-wave

Ready to use component

// add import
import WavyRings from 'rn-animated-wave';

export default function App() {
  return (
    <View>
      {/* Use Component */}
      <WavyRings
        rings={7}
        width={200}
        height={200}
        delay={500}
        isRunning={true}
      >
        {/*children*/}
      </WavyRings>
    </View>
  );
}

Customize your waves

// Container to contain the rings
import { RingsContainer, Ring } from 'rn-animated-wave';

export default function App() {
  return (
    <View>
      {/* Use Container */}
      <RingsContainer width={100} height={100}>
        {/* Use and style individual Rings */}
        <Ring delay={0} width={100} height={100} isRunning={true} />
        <Ring delay={500} width={100} height={100} isRunning={true} />

        {/* Content to show inside Box/Circle */}
        <View
          style={{
            position: 'absolute',
            zIndex: 2,
          }}
        >
          <Text>Box</Text>
        </View>
      </RingsContainer>
    </View>
  );
}

WavyRings Component

Premade ready to use rings component

PropsDescriptionRequiredDefault
ringsnumber of rings to displayyes--
widthwidth of the visible Box/Circleyes--
heightheight of the visible Box/Circlenowidth
delaydelay in miliseconds between each ring's animationyes--
isRunningboolean to toggle animationyes--
ringsStylestylesheet object to style every ringno--
containerStylestylesheet object to style the parent wrapperno--
boxStylestylesheet object to style the visible shapeno--
childrenContainerStylestylesheet object to style children wrapperno--

RingsContainer Component

A wrapper to use if you wish to customize your individual rings

PropsDescriptionRequiredDefault
widthwidth of the visible Box/Circleyes--
heightheight of the visible Box/Circlenowidth
containerStylestylesheet object to style the parent wrapperno--
boxStylestylesheet object to style the visible shapeno--

Ring Component

Animated ring component

PropsDescriptionRequiredDefault
delaydelay in miliseconds between each ring's animationyes--
widthwidth of the visible Box/Circleyes--
heightheight of the visible Box/Circlenowidth
isRunningboolean to toggle animationyes--
stylestylesheet object to style the ringno--

License

MIT


Made with create-react-native-library