@snskar125/rn-ripple

1.0.5 • Public • Published

@snskar125/rn-ripple

Ripple Effect Component for React Native

Usage

import { StyleSheet, Text, View } from "react-native";
import TouchableRipple from "@snskar125/rn-ripple";

export default function App() {
  return (
    <View style={styles.container}>
      <TouchableRipple
        rippleColor={"rgba(255,255,255,0.5)"}
        style={styles.button}
      >
        <Text style={styles.text}>Button</Text>
      </TouchableRipple>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "#fff",
    alignItems: "center",
    justifyContent: "center",
  },
  button: {
    backgroundColor: "#6fd5fc",
    paddingVertical: 15,
    paddingHorizontal: 50,
    borderRadius: 30,
  },
  text: {
    color: "#252525",
    fontWeight: "600",
    fontSize: 20,
  },
});

Props

Prop Type
rippleColor String (Use RGBA for Transparency)
background Boolean (Ripple Position)

All TouchableWithoutFeedback Props

Package Sidebar

Install

npm i @snskar125/rn-ripple

Weekly Downloads

5

Version

1.0.5

License

ISC

Unpacked Size

5.03 kB

Total Files

3

Last publish

Collaborators

  • snskar125