https://github.com/zuramai/rolloc
Create your own roll spinner with Rolloc.js
https://github.com/zuramai/rolloc
roller spinner
Last synced: 4 months ago
JSON representation
Create your own roll spinner with Rolloc.js
- Host: GitHub
- URL: https://github.com/zuramai/rolloc
- Owner: zuramai
- Created: 2022-04-10T00:23:07.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-03T04:43:56.000Z (about 3 years ago)
- Last Synced: 2025-01-31T23:15:58.300Z (4 months ago)
- Topics: roller, spinner
- Language: TypeScript
- Homepage: https://zuramai.github.io/rolloc
- Size: 96.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rolloc
A Javascript library to create spin roller. [Open demo](https://zuramai.github.io/rolloc/).## Installation
1. Install
```bash
npm install rolloc # or yarn/pnpm
```## Basic Usage
HTML:
```html
```
JS:
```js
import { createRolloc } from "rolloc"const options = {
size: {
height: 400,
width: 400
},
// The roll default options
rollOptions: {
duration: 5000
}
}const rolloc = createRolloc("#roller", options)
// Roll and override the default rollOptions
rolloc.roll({
duration: ~~input.value
})
```## Running the demo locally
```bash
git clone https://github.com/zuramai/rolloc.git
cd rolloc
pnpm install -r# Run the js
pnpm run js:dev# And run the demo site (vite)
pnpm run dev
```## Contributing
1. Fork this repository
2. Make a change and commit to the forked repository
3. Make a pull request to this repository