2.0.0 • Published 5 years ago
rn-animation-parallax v2.0.0
Not available for React JS
Demo
Instalation
Yarn
yarn add rn-animation-parallax
Npm
npm i rn-animation-parallax
Code Example
import React from 'react';
import { Button, Text } from 'react-native';
import { Parallax, toggleAnimation } from 'rn-animation-parallax';
export default function Home() {
return (
<>
<Parallax style={{
backgroundColor: 'blue',
borderBottomLeftRadius: 20,
borderBottomRightRadius: 20,
}}>
<Text>Hello World!</Text>
</Parallax>
<Button title="Toggle Animation" onPress={toggleAnimation} />
</>
);
}
Props
Parallax - Component like any other, internally is an Animated.View
toggleAnimation - method to decrease and increase the size of Parallax
Need help?
If you need help with Socrates Template, feel free to open an issue with a description of the problem you're facing.
License
MIT ©
Author
- Marcelo Silva
Twitter: @marcelxsilva