react-pico-8

PICO-8 Logo
Props
State
Buttons

Usage


import React from 'react'
import Pico8 from 'react-pico-8'
import { Controls,
         Pause,
         Sound,
         Fullscreen } from 'react-pico-8/buttons'

const App = () => (
  <Pico8 src="index.js"
         autoPlay={true}
         legacyButtons={false}
         hideCursor={false}
         center={true}
         blockKeys={false}
         usePointer={true}
         unpauseOnReset={true}
         placeholder="placeholder.png"
  >
    <Controls/>
    <Pause/>
    <Sound/>
    <Fullscreen/>
  </Pico8>
)

Simply add the game widget to the React application using JSX.

Be sure to include the .js src of the game cartridge generated from PICO-8's web export.