README
A classic game, built as reusable react component. Very lightweight, easy to install and get up and running.
Try the demo here.
Installation
npm i snake-game-react --save
Usage
import Snake from 'snake-game-react';
function App() {
return (
<div className="App">
<Snake
color1="#248ec2"
color2="#1d355e"
backgroundColor="#ebebeb"
/>
</div>
);
}
export default App;
Props
To match branding, you can input your preferred color scheme.
Props:
- color1: string
- color2: string
- backgroundColor: string
Dependencies
React of course.