Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
react-slot-counter
Advanced tools
React component that uses slot machine animations to display numbers and strings. It is possible to set the duration of the animation and the class name of the character and separator.
npm install react-slot-counter
import React from 'react';
import SlotCounter from 'react-slot-counter';
function App() {
return (
<div>
<SlotCounter value={123456} />
<SlotCounter value="1,234,567" />
<SlotCounter value="??????" />
<SlotCounter value={36.5} duration={2} />
<SlotCounter
value={123456}
charClassName="char"
separatorClassName="sep"
/>
</div>
);
}
export default App;
Check out the demo page for examples of usage and options.
Prop | Type | Default | Description |
---|---|---|---|
value (required) | number or string | The value to be displayed. It can be a number or a string with numbers and commas. If the string contains other characters, they will be displayed as question marks. | |
duration | number | 0.6 | The duration of the animation in seconds. |
charClassName | string | The class name of each character. | |
separatorClassName | string | The class name of the separator character (. or , ). |
This project is licensed under the MIT License
FAQs
Make Your Numbers Pop: Simple and Dynamic Counters for Your UI
The npm package react-slot-counter receives a total of 4,206 weekly downloads. As such, react-slot-counter popularity was classified as popular.
We found that react-slot-counter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.