react-pico
v0.0.2
Published
A React component library for PICO-8 game embedding
Maintainers
Readme
react-pico (experimental)
Version: 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.
Install
npm install react-picoQuick use
import { Pico8Shell } from 'react-pico'
import 'react-pico/style.css' // optional default styles
export default function App() {
return (
<Pico8Shell
cartSrc="/path/to/your/pico8_export.js" // your exported Pico-8 cart
autoplay={false}
allowMobileMenu={true}
/>
)
}Notes:
- You must provide and host your own PICO-8 exported JS (set via
cartSrc). - This package currently only exposes the
Pico8Shellcomponent and styles.
Props (minimal)
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)
License
MIT
