{"id":27654115,"url":"https://github.com/maeldrapier/react-simple-snake","last_synced_at":"2025-07-22T06:04:36.235Z","repository":{"id":46226685,"uuid":"297340556","full_name":"MaelDrapier/react-simple-snake","owner":"MaelDrapier","description":"A simple snake game created with the React framework.","archived":false,"fork":false,"pushed_at":"2023-03-06T18:51:45.000Z","size":3842,"stargazers_count":45,"open_issues_count":3,"forks_count":143,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T08:06:47.546Z","etag":null,"topics":["javascript","javascript-game","npm","npm-package","react","simple","simple-game","snake","snake-game"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-simple-snake","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaelDrapier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-21T13:00:24.000Z","updated_at":"2025-04-01T19:27:44.000Z","dependencies_parsed_at":"2024-06-19T16:02:41.103Z","dependency_job_id":"35286cd7-3abf-4ed4-8497-00cc735ed3d5","html_url":"https://github.com/MaelDrapier/react-simple-snake","commit_stats":{"total_commits":47,"total_committers":1,"mean_commits":47.0,"dds":0.0,"last_synced_commit":"f69501d500bf482cb410515e6a4d39b6b1f03320"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MaelDrapier/react-simple-snake","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaelDrapier%2Freact-simple-snake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaelDrapier%2Freact-simple-snake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaelDrapier%2Freact-simple-snake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaelDrapier%2Freact-simple-snake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaelDrapier","download_url":"https://codeload.github.com/MaelDrapier/react-simple-snake/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaelDrapier%2Freact-simple-snake/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266437369,"owners_count":23928235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","javascript-game","npm","npm-package","react","simple","simple-game","snake","snake-game"],"created_at":"2025-04-24T05:26:01.830Z","updated_at":"2025-07-22T06:04:36.216Z","avatar_url":"https://github.com/MaelDrapier.png","language":"JavaScript","readme":"# react-simple-snake\n[![GitHub](https://img.shields.io/github/license/MaelDrapier/react-simple-snake)](https://github.com/MaelDrapier/react-simple-snake/blob/master/LICENSE)\n[![npm](https://img.shields.io/npm/v/react-simple-snake?color=blue)](https://www.npmjs.com/package/react-simple-snake)\n[![npm peer dependency version](https://img.shields.io/npm/dependency-version/react-simple-snake/peer/react?color=cyan)](https://www.npmjs.com/package/react)\n[![npm](https://img.shields.io/npm/dm/react-simple-snake)](https://www.npmjs.com/package/react-simple-snake)\n\nA simple snake game created with the [React](https://reactjs.org) JavaScript library.\n\n- [Demo](#demo)\n- [Installation](#installation)\n  - [To add it to your React app](#to-add-it-to-your-react-app)\n  - [To launch the development server](#to-launch-the-development-server)\n- [Dependencies](#dependencies)\n- [Usage](#usage)\n  - [To import it in your component](#to-import-it-in-your-component)\n  - [Props](#props)\n- [How to play](#how-to-play)\n- [High-Score](#high-score)\n\n\u003cbr/\u003e\n\n## Demo\n[![Website](https://img.shields.io/website?label=demo%20status%3A\u0026url=https%3A%2F%2Fmaeldrapier.github.io%2Freact-simple-snake%2F)](https://MaelDrapier.github.io/react-simple-snake)\n\nA demo is available [here](https://MaelDrapier.github.io/react-simple-snake).\n\n\u003cbr/\u003e\n\n## Installation\n\n### To add it to your react app\n- `npm install react-simple-snake`\n\n### To launch the development server\n\n- `git clone https://github.com/MaelDrapier/react-simple-snake.git`\n- `cd react-simple-snake`\n- `npm install`\n- `npm start`\n\n\u003cbr/\u003e\n\n## Dependencies\nThis project needs [react](https://www.npmjs.com/package/react) to operate. Install it with `npm install react`\n\n\u003cbr/\u003e\n\n## Usage\n\n### To import it in your component\n\n``` javascript\nimport Snake from 'react-simple-snake'\n\nexport default function YourComponent() {\n  return(\n    \u003cdiv\u003e\n      \u003cSnake /\u003e\n    \u003c/div\u003e\n  )\n}\n\n```\n\n### Props\n_All props are optional_\n\n|Prop|Type|Default value|Description|\n|:-:|:-:|:-:|:-|\n|`percentageWidth`|number|`40`|A **percentage** defining the width of the game board, based on the width of the game's parent element|\n|`startSnakeSize`|number|`6`|The starting size of the snake|\n|`snakeColor`|string|_random_|The color of the snake|\n|`appleColor`|string|_random_|The color of apples|\n\n\u003cbr/\u003e\n\n## How to play\nYou can move the snake with the arrow keys or `W` / `A` / `S` / `D`.\n\n\u003cbr/\u003e\n\n## High-Score\nThe highest score is saved locally in the browser's _local storage_, in a `snakeHighScore` field.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaeldrapier%2Freact-simple-snake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaeldrapier%2Freact-simple-snake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaeldrapier%2Freact-simple-snake/lists"}