Socket
Socket
Sign inDemoInstall

react-native-linear-animated-gradient-transition

Package Overview
Dependencies
2
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-linear-animated-gradient-transition

AnimatedGradientTransition


Version published
Weekly downloads
87
decreased by-64.2%
Maintainers
1
Install size
1.52 MB
Created
Weekly downloads
 

Readme

Source

react-native-linear-animated-gradient-transition

react-native-linear-animated-gradient-tra

Installation

npm install react-native-linear-animated-gradient-transition

Usage

import { StyleSheet, View, Button } from 'react-native';
import LinearAnimatedGradientTransition from 'react-native-linear-animated-gradient-transition';

export default function App() {
  const [clicked, setClicked] = React.useState<boolean>();
  return (
    <View style={styles.container}>
      <LinearAnimatedGradientTransition
        style={styles.gradient}
        colors={clicked ? ['#F37144', '#F0A148'] : ['#2b32b2', '#1488cc']}
      />
      <Button title="Click" onPress={() => setClicked(!clicked)} />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
  gradient: {
    width: 200,
    height: 200,
    margin: 20,
  },
});

License

MIT

Keywords

FAQs

Last updated on 29 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc