react customizable pulsator component
see Demo at https://codesandbox.io/s/react-pulsator-demo-dpysp
- add package using
yarn
:
yarn add react-pulsator
- use the render-props component:
import React from 'react'
import Pulsator from 'react-pulsator'
export default function App() {
return (
<div>
<Pulsator
width="250px"
height="250px"
innerColor="green"
outerColor="green"
>
<h1>Hello World</h1>
</Pulsator>
</div>
)
}
- available props:
prop key | type |
---|---|
width | string |
height | string |
innerColor | string |
outerColor | string |
className | string |