https://github.com/joeyko/react-siriwave
React version of Siriwave.js http://kopiro.github.io/siriwave
https://github.com/joeyko/react-siriwave
react-siriwave reactjs siriwave
Last synced: 2 months ago
JSON representation
React version of Siriwave.js http://kopiro.github.io/siriwave
- Host: GitHub
- URL: https://github.com/joeyko/react-siriwave
- Owner: JoeyKo
- Created: 2018-05-26T12:15:00.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-29T07:12:36.000Z (about 2 years ago)
- Last Synced: 2025-04-12T04:59:58.709Z (2 months ago)
- Topics: react-siriwave, reactjs, siriwave
- Language: TypeScript
- Homepage:
- Size: 38.1 KB
- Stars: 15
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React-Siriwave
[](https://www.npmjs.com/package/react-siriwave)
## Install
npm
```
npm install --save react-siriwave
```
yarn
```
yarn add react-siriwave
```## Usage
```javascript
import Siriwave from 'react-siriwave';// ...
// ...
```
## [Demo](https://codesandbox.io/s/quirky-williams-m7ip0)
## Constructor options
| Key | Type | Description | Default | Required |
| ---------- | ------------- | ---------------------------------------------------------------------- | ---------- | -------- |
| theme | "ios", "ios9" | The curve style of the wave. | "ios" | no |
| ratio | Number | Ratio of the display to use. Calculated by default. | calculated | no |
| speed | Number | The speed of the animation. | 0.2 | no |
| amplitude | Number | The amplitude of the complete wave-form. | 1 | no |
| frequency | Number | The frequency of the complete wave-form. Only available in style "ios" | 6 | no |
| color | String | Color of the wave. Only available in style "ios" | "#fff" | no |
| cover | Bool | The `canvas` covers the entire width or height of the container | false | no |
| autostart | Bool | Decide wether start the animation on boot. | true | no |
| pixelDepth | Number | Number of step (in pixels) used when drawed on canvas. | 0.02 | no |
| lerpSpeed | Number | Lerp speed to interpolate properties. | 0.01 | no |
| curveDefinition | ICurveDefinition[] | Override definition of the curves | null | no |
| onInit | (siriwave: Siriwave) => void | Callback function to get the siriwave instance | null | no |