Git Product home page Git Product logo

react-native-material-ripple's Introduction

react-native-material-ripple

npm license codeclimate

Base component for touchable elements

example

Features

  • Easy to use
  • Configurable
  • Consistent look and feel on iOS and Android
  • Can be used as drop-in replacement for TouchableWithoutFeedback
  • Pure javascript implementation

Installation

npm install --save react-native-material-ripple

Usage

import React, { Component } from 'react';
import { Text } from 'react-native';
import Ripple from 'react-native-material-ripple';

class Example extends Component {
  render() {
    return (
      <Ripple>
        <Text>touch me</Text>
      </Ripple>
    );
  }
}

Properties

name description type default
rippleColor Ripple color String rgb(0, 0, 0)
rippleOpacity Ripple opacity Number 0.3
rippleDuration Ripple duration in ms Number 400
rippleSize Ripple size restriction Number 0
rippleContainerBorderRadius Ripple container border radius Number 0
rippleCentered Ripple always starts from center Boolean false
rippleSequential Ripple should start in sequence Boolean false
rippleFades Ripple fades out Boolean true
disabled Ripple should ignore touches Boolean false
onPressIn Touch moved in or started callback Function -
onPressOut Touch moved out or terminated callback Function -
onPress Touch up inside bounds callback Function -
onLongPress Touch delayed after onPressIn callback Function -
onRippleAnimation Animation start callback Function -

Other TouchableWithoutFeedback properties will also work

Example

git clone https://github.com/n4kz/react-native-material-ripple
cd react-native-material-ripple/example
npm install
react-native run-ios # or run-android

Copyright and License

BSD License

Copyright 2017-2018 Alexander Nazarov. All rights reserved.

react-native-material-ripple's People

Contributors

n4kz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.