Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
react-native-pins
Advanced tools
Pins for displaying progress (active / non-active) with animation and feedback ⚫⚫⚪⚪⚪
The pins come with a shake animation and configurable device vibration.
To get started install via npm:
npm install react-native-pins
Import:
import { Pins } from 'react-native-pins';
Then add it to your code:
<Pins
onRef={ref => (this.pins = ref)}
numberOfPins={5}
numberOfPinsActive={2}
numberOfPinsMaximum={2}
activeOnly
/>
The <Pins />
has a shake()
method which can be called through a reference this.pins.shake()
.
This will perform a shake animation and vibration if enabled. A callback can be passed through props which
will be fired when the animation is complete. See props below.
Prop | Type | Optional | Default | Description |
---|---|---|---|---|
onRef | any | Yes | onRef allows you to call the shake() method. | |
activeOnly | booolean | yes | false | Whether to only fill the active pin or to fill all of them. |
spacing | number | yes | 15 | The space between the pins |
pinSize | number | yes | 18 | The size of the pins |
numberOfPins | number | Yes | 5 | Number of pins to render. |
numberOfPinsActive | number | Yes | 0 | Number of active pins. You can pass the pin.length here. |
vibration | bool | Yes | true | Should vibration be enabled on shake? |
animationShakeCallback | func | Yes | A callback triggered when the pin shake animation has finished. | |
containerStyle | object | Yes | See Pins.js | Style applied to PINS container. |
pinStyle | object | Yes | See Pins.js | Style applied to each circle PIN. |
pinActiveStyle | object | Yes | See Pins.js | Style applied to each circle PIN when it is active. |
numberOfPinsMaximum | number | Yes | This property is used to set a maximum number of pins to show. If specified, then the pins will have an animation effect, as showcased in the demo above. |
Thanks goes to these wonderful people (emoji key):
Luke Brandon Farrell 💻 📖 | Rodrigo Vieira 💻 | Denise Ng 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
This project is licensed under the MIT License
FAQs
Pins for displaying progress (active / non-active) with animation and feedback ⚫⚫⚪⚪⚪
The npm package react-native-pins receives a total of 100 weekly downloads. As such, react-native-pins popularity was classified as not popular.
We found that react-native-pins demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.