Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-wiggle-box

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-wiggle-box

A react native box that wiggles for attention

  • 1.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-30%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-wiggle-box

Package version Make a pull request License npm downloads Greenkeeper badge Travis CI build status code style: prettier

A box that wiggles for clickable attention

Contents

Install

yarn add react-native-wiggle-box

OR

npm install react-native-wiggle-box

Usage

import React from 'react'
import { View, Text, StyleSheet } from 'react-native'
import WiggleBox from 'react-native-wiggle-box'

class Example extends React.Component {

    handleClick = () => console.log("You've just clicked on the box")

    render() {
        <View>
            <WiggleBox
                active={true}
                handlePress={this.handleClick}
                boxStyle={styles.boxContainer}
                duration={200}
                type={'wiggle'}
            >
                <Text>
                    I wiggle
                </Text>
            </WiggleBox>
            <WiggleBox
                active={true}
                handlePress={this.handleClick}
                boxStyle={styles.boxContainer}
                type={'bounce'}
            >
                <Text>
                    I bounce
                </Text>
            </WiggleBox>
        </View>
    }
}

const styles = StyleSheet.create({
    boxContainer: {
        backgroundColor: "#3BD0F5",
        height: 100,
        width: 100,
        alignItems: "center",
        justifyContent: "center"
    }
})

Props

PropertyDescriptionTypeDefault Value
activeValue toggling wiggle of boxBooleanfalse
boxStyleStyles of boxObject{}
handlePressFunction to execute on click of the boxFunction() => {}
durationTime (ms) for duration of animationInteger100
typeDistinguish between wiggle or bounce, to draw attentionStringwiggle

Contribute

Contributions are welcome!

  1. Fork it.
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Or open up a issue.

License

MIT

Keywords

FAQs

Package last updated on 30 Apr 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc