Add the Material Design ripple effect to React component.
Usage
Ink must be placed within another component with a position is not static
:
var React = require('react');
var Ink = require('react-ink');
module.exports = React.createClass({
render() {
return (
<button style={{ position: "relative" }}>
<Ink />
</button>
);
}
});
There are several options available for how <Ink />
renders, see the getDefaultProps()
declaration, however descriptions follow:
Configuration
{
background : true,
duration : 1000,
opacity : 0.25,
radius : 150,
recenter : true,
style : {...},
hasTouch : true|false
}