Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/acrool/acrool-react-jackpot

React jackpot animation
https://github.com/acrool/acrool-react-jackpot

jackpot reactjs

Last synced: about 2 months ago
JSON representation

React jackpot animation

Awesome Lists containing this project

README

        

# Acrool React Jackpot


Acrool React Jackpot Logo


Fast custom jackpot for Reactjs

[![NPM](https://img.shields.io/npm/v/@acrool/react-jackpot.svg?style=for-the-badge)](https://www.npmjs.com/package/@acrool/react-jackpot)
[![npm](https://img.shields.io/bundlejs/size/@acrool/react-jackpot?style=for-the-badge)](https://github.com/acrool/@acrool/react-jackpot/blob/main/LICENSE)
[![npm](https://img.shields.io/npm/l/@acrool/react-jackpot?style=for-the-badge)](https://github.com/acrool/react-jackpot/blob/main/LICENSE)

[![npm downloads](https://img.shields.io/npm/dm/@acrool/react-jackpot.svg?style=for-the-badge)](https://www.npmjs.com/package/@acrool/react-jackpot)
[![npm](https://img.shields.io/npm/dt/@acrool/react-jackpot.svg?style=for-the-badge)](https://www.npmjs.com/package/@acrool/react-jackpot)

## Features

- Support custom length

## Install

```bash
yarn add @acrool/react-jackpot
```

## Usage

add in your index.tsx
```tst
import "@acrool/react-jackpot/dist/index.css";
```

then in your page

```tsx
import {Flex, fr, Grid} from '@acrool/react-grid';
import styled from 'styled-components';

import {Jackpot} from '@acrool/react-jackpot';
import {generatorArray} from '@acrool/js-utils/array';
import {useRef} from "react";

const Example = () => {
const [amount, setAmount] = useState(32767);
const timeRef = useRef(null);

useEffect(() => {
timeRef = setInterval(() => {
onChange(getRandom(1000));
}, 3000);

return () => {
clearInterval(timeRef.current);
};

}, []);

return (

);

export default Example;

```

There is also a example that you can play with it:

[![Play react-editext-example](https://raw.githubusercontent.com/acrool/acrool-react-jackpot/main/play-in-example-button.svg)](https://acrool-react-jackpot.pages.dev)

## License

MIT © [Acrool](https://github.com/acrool) & [Imagine](https://github.com/imagine10255)