2.0.1 • Published 3 years ago

@pistaasi/react-native-glow v2.0.1

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

pistaasi-react-native-glow

Quick npm package for a school project

Simple glow effect for icons and text using react-spring

Make sure to install react-spring first!

Install:

npm i @pistaasi/react-native-glow

Usage:

import glow from "@pistaasi/react-native-glow";
//ionicons
import { animated } from "react-spring";

const AnimatedIcon = animated(Ionicons); // check react-spring documentation

export default function GlowingIcon() {

    let glowSettings = glow(1, 20, "grey", "grey", false); 
    //Icon with grey glow
    //You will need to set color on the icon, as this is only glow color
    let glowSettingsChange = glow(1, 20, "grey", "red", true);
    //Icon that changes color with glow

    // starting size, end size, startingColor, endColor, changeIconColorWithGlow

    return (
      <View>
              
            <AnimatedIcon name="heart" size={30} color="grey" style={glowSettings}/>

             <AnimatedIcon name="heart" size={30} style={glowSettingsChange}/>
           
      </View>
    );
}
2.0.1

3 years ago

2.0.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago