@a7mddra/react-dino-game
v1.1.1
Published
A React component for the classic Google Chrome Dinosaur Game (T-Rex Runner). Originally extracted from Chromium, this game has been packaged as a modern, easy-to-import React component with full TypeScript support.
Readme
react-dino-game
A React component for the classic Google Chrome Dinosaur Game (T-Rex Runner). Originally extracted from Chromium, this game has been packaged as a modern, easy-to-import React component with full TypeScript support.

Installation
Install via npm:
npm install @a7mddra/react-dino-gameUsage
Simply import the component and the accompanying styles, and render it anywhere in your application.
import React from 'react';
import ChromeDinoGame from '@a7mddra/react-dino-game';
import '@a7mddra/react-dino-game/dist/style.css';
export default function App() {
return (
<div style={{ padding: '2rem' }}>
<h1>My App</h1>
{/* Render the game component */}
<ChromeDinoGame />
</div>
);
}Note: The game is styled to fit within its container. For the best experience, wrap it in a container with a defined width.
Local Development
If you'd like to run this repository locally to test or contribute:
- Clone the repository
- Install dependencies:
npm install - Start the Vite dev server (this will run the
src/demoapp):npm run dev - To build the library for production:
npm run build
License
MIT
