A wrap SVG component for animated linear gradient
The SVG Animated Linear Gradient component is designed for iOS and Android platforms. This component creates animated linear gradients for all SVG components used as child props. It can be used as a loading component similar to those seen on Facebook or Instagram. This component is built using expo, but users have the option to fork the repository, remove expo, and use react-native-svg instead.
To use the SVG Animated Linear Gradient component, follow these steps:
npm i react-native-svg-animated-linear-gradient --save
npm i react-native-svg
react-native link react-native-svg
import AnimatedLinearGradient from 'react-native-svg-animated-linear-gradient';
<AnimatedLinearGradient
primaryColor='#ffffff'
secondaryColor='#cccccc'
duration={3000}
width={200}
height={150}
x1='0%'
y1='0%'
x2='100%'
y2='0%'
offset={1}
>
{/* Your SVG components here */}
</AnimatedLinearGradient>
The SVG Animated Linear Gradient component offers a convenient way to create animated linear gradients for SVG components on iOS and Android platforms. With customizable properties for colors, duration, dimensions, gradient points, and offset value, this component is versatile and can be used effectively as a loading component in various applications. Users have the flexibility to adjust the component to suit their specific design requirements by forking the repository and making modifications as needed.