A React component library for PICO-8 game embedding
npm install react-picoVersion: 0.0.2
Minimal React component and styles for embedding PICO-8 carts in React apps.
This package is for personal testing only right now (v0.0.2). The API may change and things might break. Feel free to try it out and share feedback.
``bash`
npm install react-pico
`tsx
import { Pico8Shell } from 'react-pico'
import 'react-pico/style.css' // optional default styles
export default function App() {
return (
autoplay={false}
allowMobileMenu={true}
/>
)
}
`
Notes:
- You must provide and host your own PICO-8 exported JS (set via cartSrc).Pico8Shell
- This package currently only exposes the component and styles.
- cartSrc?: string — URL/path to your PICO-8 exported JS (required to load a game)autoplay?: boolean
- — try to boot automatically when allowed (default: false)allowMobileMenu?: boolean` — show mobile menu controls (default: true)
-
MIT