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

@hestabit/react-native-svg-animate

v0.0.4

Published

Animate SVG path with diffrent animation types in both Android and IOS Application.

Downloads

27

Readme

React Native SVG Animate

This package allow you to animate SVG path with diffrent animation types in both Android and IOS Application. Package is extended version of react-native-svg-animations

Dependencies

  • color
  • react-native-svg
  • svg-path-properties

Installation

$ npm i @hestabit/react-native-svg-animate

Install peer dependency

$ npm i react-native-svg 
$ react-native link react-native-svg

Showcase

Async | Delayed | One By One :-----------:|:---------------:|:-----------: Async-bounce | Delayed-bounce | OneByOne-bounce

Animation

On the following images, the pink color represents the duration value, and the blue one is for delay value.

Async

Async

Each line is drawn asynchronously. They all start and finish at the same time, hence the name async.

Delayed

Delayed

Every path element is drawn at the same time with a small delay at the start. This is currently the default animation.

One By One

One_By_ONE

Each path element is drawn one after the other. This animation gives the best impression of live drawing. The duration for each line depends on their length to make a constant drawing speed.

USAGE

import { AnimateSVG } from '@hestabit/react-native-svg-animate'
 <AnimateSVG
    strokeWidth={3}
    duration={4000}
    height={220}
    scale={1}
    width={220}
    d={design_1}
    viewBox={"0 0 512 512"}
    type={"one_by_one"}
    animEffect={"bounce"}
    ref={ref => (this._animateSVG = ref)}
/>
<Button title="Replay" onPress={()=> this._animateSVG.replay()} />
<Button title="Rewind" onPress={()=> this._animateSVG.rewind()} />

Option list

Name | Type | Description | Default Value :-----------|:-------------|:-----------------------------------|:------------ strokeColor | string | The color of the path stroke. | black strokeWidth | number | The thickness of the path stroke. | 1 duration | number | Time in ms to complete the path drawing from starting point to ending point. | 1000ms or 1s delay | number | Time in ms before starting animation. | null height | number | The height of the base SVG. | screen viewport height width | number | The width of the base SVG. | screen viewport width scale | number | The scale of the output SVG based on the width and height of the base SVG. | 1.0 or 100% fill | string | The color fill of the closed path. | none loop | bool | Whether the animation loops infinitely. | false viewBox | string | Control the viewBox by adding the attribute viewBox to the svg element.| null style | object | You can use the style property to add the styles inline. | {} type | string | Type of animation, Package can animate SVG in one of these type. [async, delayed, one_by_one] | async d | string/array | The SVG Path to be animated. (required) It can be single path as string or multiple path as an array of string. | - animEffect | string | Defines what kind of easing effect will be used: [linear, ease_in, ease_out, back, bounce, elastic] | linear

Methods

Name | Description :-----------:|:-------------: replay() | Restart the animation. rewind() | Play the animation in reverse mode.