react-native-pulsator-native
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

react-native-pulsator-native

Pulsator for React Native. This library binds iOS and Android libraries from below repositories:

Demo 01

Installation

  • Step 1:
yarn add react-native-pulsator-native
  • Step 2:
cd ios && pod install

Usage

import {TouchableOpacity, View} from "react-native";
import PulsatorNative from "react-native-pulsator-native";
import Icon from "react-native-vector-icons/Ionicons";
import React from "react";
 
export default function () {
 
    const [isRunning, setRunning] = React.useState(true)
 
    return <View style={{
        justifyContent: 'center',
        alignContent: 'center',
        alignItems: 'center',
        flex: 1
    }}>
        <TouchableOpacity
            onPress={() => setRunning(!isRunning)}
        >
            <PulsatorNative pulsatorColor={'#4c77cb'}
                            isRunning={isRunning}>
                <Icon name='ios-search'
                      color={'#fff'}
                      size={100}/>
            </PulsatorNative>
        </TouchableOpacity>
    </View>
}
 
 

Props

pulsatorColor

Color of pulsation. Note color type hex.

style

style of pulsation

isRunning

set Sate for pulsation. True is running, false is stop

Demo

Demo 02

Package Sidebar

Install

npm i react-native-pulsator-native

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

56.8 kB

Total Files

25

Last publish

Collaborators

  • daihieptn97