Effects / Snow
Sparks fly when the user enters or exits the component
Options
Option | What it does |
---|---|
size | Distance to draw outside of the component in pixels |
Example
Example Code
import { Tile } from "../../components/Tile.js";
import withNeon, { fx } from "react-neon";
const effect = new fx.Sparks();
effect.listenMouse();
class SparksTile extends React.Component {
render(){
return (
<Tile bg="black" className="one">
<div style={{ backgroundImage: "url(https://source.unsplash.com/random?s)" }}></div>
</Tile>
)
}
};
const Sparks = withNeon(SparksTile, effect);