npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-companim

v1.0.5

Published

Animated Components for React Native

Downloads

10

Readme

Indicators (1) 20200531-165058-edited1 20200531-170259-edited

Installation

npm i react-native-companim

Components Animated

  • MultiplyButton

  • FadeButton

  • RotateButton

  • BounceButton

  • ScaleButton

  • Card

  • CircleIndicator

  • MultiplyIndicator

  • RotateIndicator

  • ScaleIndicator

  • SequentIndicator

  • SuddenIndicator

Usage

MultiplyButton

import React from 'react'
import {MultiplyButton} from 'react-native-companim'
import {View} from "react-native"

export default class App extends React.Component{

  render() {
    return (
      <View style={{justifyContent:"center",alignItems:"center",flex:1}}>


        <MultiplyButton middleButtonPixel={50} 
                        lastButtonPixel={100} 
                        direction="y" 
                        tension={40} 
                        friction={40} 
                        delay={500}
                        />
    )}
  }

Code explanation: You can specify style of the all of three button whatever you want.You can also specify child components of the buttons You can also specify:

  • direction value which is movement direction for all buttons
  • tension value
  • friction value
  • delay value which is waiting time before animation
  • middleButtonPixel value which is pixel that you want to move for middle button
  • lastButtonPixel value which is pixel that you want to move for last button
  • firstButtonChilds value which is components that you want set inside of the button
  • secondButtonChilds value which is components that you want set inside of the button
  • lastButtonChilds value which is components that you want set inside of the button
  • firstButtonStyle value which is style of the button
  • middleButtonStyle value which is style of the button
  • lastButtonStyle value which is style of the button

| prop | #default | | :-----: | :--------------: | | direction | x-axis | | tension | 40 | | friction | 40 | | delay | 0 | | middleButtonPixe| 50 | |lastButtonPixel| 100 | |firstButtonChilds| none| |secondButtonChilds| none | |lastButtonChilds | none | |firstButtonStyle |object | |middleButtonStyle| object| |lastButtonStyle|object|

Card

import React from 'react'
import {Card} from 'react-native-companim'
import {View} from "react-native"

const data = [1,2,3,4,5,6]//it is added just for map function.Not important!

const datas={   "name":"xxxx",
                "title":"xxxx",
                "subtitle":"xxxx",
                "middleTitle":"xxxx"
          }

export default class App extends React.Component{

  render() {
    return (
        {data.map((_,index)=>{ return <Card sequentially={index} 
                                            animationType="opacity" 
                                            title={datas.title} 
                                            titleStyle={{color:"green"}}
                                            />
                                            })}
      )
    }
}

Code explanation: You can specify style of the title,subtitle,middletitle and endtitle whatever you want.You can also specify:

  • animationType value which is can take leftToRight , opacity , bothLeftToRightOpacity, bytheZaxis, bytheXaxis and bytheYaxis values(for the animation, index value of the map function is necessary)
  • sequentially value which takes index of the map function (necessary for the animation)

| prop | #default | | :-----: | :--------------: | | animationType | leftToRight | | sequentially | index of map function(it necessary for animation) | | title | xxxx | | titleStyle | {color:"green"} | | subtitle| {color:"blue"} | |middleTitle| xxxx | |middleTitleStyle| {color:"green"}| |endTitle| xxxx | |endTitleStyle | {color:"green"} | |image | none |

Bounce Button


import React from 'react'
import {BounceButton} from 'react-native-companim'
import {View} from "react-native"

export default class App extends React.Component{

 render() {
   return (
       <BounceButton   style={{backgroundColor:"green",width:200,height:200}}
                       duration={500} 
                       direction={false}
                       friction={false} 
                       delay={0}/>
     )
   }
}

Code explanation: You can specify style of the button whatever you want.You can also specify:

  • duration value which is the complement time of the animation
  • direction value which is used for direction of the animation such as to forward(with false value) or to upward(with true value)
  • friction value is the effect of the animation
  • delay value is the waiting time before the animation

| prop | #default | | :-----: | :--------------: | | duration | 500 | | direction| (true)forwards | | friction | 40 | | delay | 0 | | style | object |

Fade Button


import React from 'react'
import {FadeButton} from 'react-native-companim'
import {View} from "react-native"

export default class App extends React.Component{

 render() {
   return (
         <FadeButton   style={{backgroundColor:"green",width:200,height:200}}
                       duration={500} 
                       repeat={true} 
                       gone={true}/>
     )
   }
}

Code explanation: You can specify style of the button whatever you want.You can also specify :

  • duration value which is the complement time of the animation
  • repeat value which is repetition of the animation.If it is true, animation playing continuously
  • gone value is that when is true , button is not shown again

| prop | #default | | :-----: | :--------------: | | duration | 1000 | | gone | (false) | | repeat | false | | style | object |

Rotate Button


import React from 'react'
import {RotateButton} from 'react-native-companim'
import {View} from "react-native"

export default class App extends React.Component{

 render() {
   return (
         <RotateButton  
                       style={{backgroundColor:"green",width:200,height:200}}
                       from_deg="0" 
                       to_deg="-45"
                       delay={100} 
                       duration={500} 
                       type="infinite" />
     )
   }
}

Code explanation: You can specify style of the button whatever you want.You can also specify :

  • from_deg value which is beginning degree of the animation
  • to_deg value which is last degree of the animation
  • delay value is waiting time before the animation
  • duration value which is the complement time of the animation
  • type value can be take three value which is infinite,comeback,shake

| prop | #default | | :-----: | :--------------: | |type | shake | | from_deg | none | | to_deg | none | | delay | 0 | | duration | 500 | | style | object |

Scale Button


import React from 'react'
import {ScaleButton} from 'react-native-companim'
import {View} from "react-native"

export default class App extends React.Component{

 render() {
   return (
         <ScaleButton  
                       style={{backgroundColor:"green",width:200,height:200}}
                       animationType="bothXYaxis"
                       duration={1000} 
                       />
     )
   }
}

Code explanation: You can specify style of the button whatever you want.You can also specify :

  • delay value is waiting time before the animation
  • duration value which is the complement time of the animation
  • animationType value can be take three value which is bothXYaxis,byTheYaxis,byTheXaxis

| prop | #default | | :-----: | :--------------: | |animationType | byTheXaxis | | duration | 1000 | | delay | 0 | | style | object |

CircleIndicator


import React from 'react'
import {CircleIndicator} from 'react-native-companim'

export default class App extends React.Component{

 render() {
   return (
         <CircleIndicator  
                       color={["gray","blue","yellow","green"]}
                       delay={0}
                       />
     )
   }
}

| prop | #default | | :-----: | :--------------: | |duration | 2000 | | delay | 0 | | color | ["gray","blue","yellow","green"] |

MultiplyIndicator


import React from 'react'
import {MultiplyIndicator} from 'react-native-companim'

export default class App extends React.Component{

  render() {
    return (
          <MultiplyIndicator  
                        duration={1000} 
                        tension={40}
                        />
      )
    }
}

| prop | #default | | :-----: | :--------------: | |duration | 2000 | | delay | 0 | |tension | 40 | | friction | 40 | | color | ["green","blue","yellow"] |

RotateIndicator


import React from 'react'
import {RotateIndicator} from 'react-native-companim'

export default class App extends React.Component{

  render() {
    return (
          <RotateIndicator  
                        duration={1000} 
                        delay={0}
                        />
      )
    }
}

| prop | #default | | :-----: | :--------------: | |duration | 1000 | |delay | 0 |

ScaleIndicator


import React from 'react'
import {ScaleIndicator} from 'react-native-companim'

export default class App extends React.Component{

  render() {
    return (
          <ScaleIndicator  
                        tension={80} 
                        />
      )
    }
}

| prop | #default | | :-----: | :--------------: | |tension | 200 | |style | object |

Sequent Indicator


import React from 'react'
import {SequentIndicator} from 'react-native-companim'

export default class App extends React.Component{

  render() {
    return (
          <SequentIndicator  
                        tension={200}
                        middleStyle={{......}}
                        />
      )
    }
}

| prop | #default | | :-----: | :--------------: | |tension | 40 | |rightSecondaryStyle | object | |rightFirstStyle | object | |leftFirstStyle | object | |leftSecondaryStyle | object | |middleStyle | object |

Sudden Indicator


import React from 'react'
import {SuddenIndicator} from 'react-native-companim'

export default class App extends React.Component{

  render() {
    return (
          <SuddenIndicator  
                       />
      )
    }
}

| prop | #default | | :-----: | :--------------: | |tension | 90 | |style| object|