Modern UI.Minimal footprint.

PocketJS brings modern layout, text, animation, and input to resource-constrained hardware. Build with a compact native engine, then add adaptive components and themes with PocketUI.

Solid · Vue Vapor · Octane
TypeScript with the frameworks themselves
8 MB
for a complete animated app
333 MHz
one CPU core is enough for 60 fps
TypeScript, real frameworks

Solid, Vue Vapor or Octane.
On a 333 MHz CPU.

Import signals, refs and hooks from solid-js, vue and octane. PocketJS supplies the components and draws them natively: no DOM, no WebView, no browser engine.

import { createSignal, Show } from "solid-js";
import { Text, View } from "@pocketjs/framework/solid/components";

export default function App() {
  const [count, setCount] = createSignal(0);
  return (
    <View class="w-full h-full flex-col items-center gap-4 p-4 bg-slate-50">
      <Text class="text-xl text-slate-950 font-bold">Count: {count()}</Text>
      <View class="px-4 py-2 rounded-xl shadow-md bg-blue-600 focus:bg-blue-500"
        focusable onPress={() => setCount(count() + 1)}>
        <Text class="text-base text-white font-bold">Press Circle</Text>
      </View>
      <Show when={count() > 3}>
        <Text class="text-sm text-emerald-600">Reactive on real hardware.</Text>
      </Show>
    </View>
  );
}
import { ref } from "vue";
import { Text, View } from "@pocketjs/framework/vue-vapor/components";

export default function App() {
  const count = ref(0);
  return () => (
    <View class="w-full h-full flex-col items-center gap-4 p-4 bg-slate-50">
      <Text class="text-xl text-slate-950 font-bold">Count: {count.value}</Text>
      <View class="px-4 py-2 rounded-xl shadow-md bg-blue-600 focus:bg-blue-500"
        focusable onPress={() => { count.value++; }}>
        <Text class="text-base text-white font-bold">Press Circle</Text>
      </View>
      {count.value > 3 ? (
        <Text class="text-sm text-emerald-600">Reactive on real hardware.</Text>
      ) : null}
    </View>
  );
}
import { useState } from "octane";
import { Text, View } from "@pocketjs/framework/octane/components";

export default function App() {
  const [count, setCount] = useState(0);
  return (
    <View class="w-full h-full flex-col items-center gap-4 p-4 bg-slate-50">
      <Text class="text-xl text-slate-950 font-bold">{`Count: ${count}`}</Text>
      <View class="px-4 py-2 rounded-xl shadow-md bg-blue-600 focus:bg-blue-500"
        focusable onPress={() => setCount(count + 1)}>
        <Text class="text-base text-white font-bold">Press Circle</Text>
      </View>
      {count > 3 ? (
        <Text class="text-sm text-emerald-600">Reactive on real hardware.</Text>
      ) : null}
    </View>
  );
}

The same screen, three frameworks

Time to produce a frame on a Sony PSP: one MIPS core at 333 MHz.

Solid3.66 ms
Vue Vapor3.61 ms
Octane6.53 ms
016.7 ms

Bars span the 16.7 ms a frame gets at 60 fps. Seven samples per framework.

Minimal footprint

Megabytes of memory.
Megahertz of CPU.

With no browser engine underneath, your app, its layout and its drawing share one thread on one core. Here is what that costs on a 2004 handheld.

Memory
iPhone 17 Pro Max · 12 GB
The same left edge,
magnified 384×
Sony PSP · 32 MBPocketJS app · 8 MB
Clock, one core
A19 Pro performance core · 4.26 GHz
Sony PSP, MIPS · 333 MHz

A complete animated PocketJS app runs in 8 MB on one 333 MHz core: 1/1536 of the phone's memory, on a core clocked 13 times lower.

A settings screen with switches, a slider and theme swatches, captured on a PSP
8MB

A complete animated app: a quarter of the PSP's 32 MB.

An image gallery with a focused card, captured on a PSP
60fps

Smooth on a single 333 MHz core from 2004.

The PocketUI gallery in its Pocket theme
213KB

The whole PocketUI gallery app, as a minified bundle.

Modern UI

And everything a modern
screen expects.

On top of that engine: the layout, type, motion and input people know from their phones.

Layout

Flexbox and utility classes, sized to any screen.

Rows, columns, gaps, rounded corners and shadows, written as classes you already know. The same app fills a tall touch screen and a wide tablet panel.

Pocket Shell's home screen on a tall touch screen
Pocket Shell's home screen on an M5Stack Tab5
Text

Sharp type in every script.

Latin, Chinese and Japanese, crisp at small sizes. Lists, transcripts and editors read the way they do on a phone.

A session list and a transcript in Chinese and English
Animation

Springs and keyframes that keep their pace.

Motion compiles at build time and runs inside the native engine, with no JavaScript per frame, so it stays smooth while your app is busy.

Six motion studies: menu, d-pad, share, hover, reload and keypad

Motion studies by yui540, ported with permission (yui540).

Input

Touch, buttons, keyboards and focus.

Tap, swipe, scroll, type, or move focus with a d-pad. One app answers whichever input the device has.

PocketUI

Adaptive components. Themes that switch live.

PocketUI gives a Solid app panes, feeds, menus, forms and a full text editor. Each part adapts to the screen and its controls, and a theme restyles the whole app while it runs: your typing, scroll position and focus stay put.

import { mountPocketUI } from "@pocketjs/framework/ui";
The PocketUI gallery in the Pocket theme The PocketUI gallery in the Classic 98 theme The PocketUI gallery in the XP theme The PocketUI gallery in the Aqua theme
Runs on

From microcontrollers
to handhelds.

The engine is the same everywhere. A small adapter connects it to each device's screen and controls.

Microcontrollers

Handhelds

  • Anbernic RG DS Plus
  • M5Stack Tab5 and CardputerZero
  • Nintendo 3DS
  • PSP and PS Vita

Phones and readers

Desktop and web

  • Linux panels
  • macOS
  • Any modern browser
Made with PocketJS

Real apps, on real devices.

Community

What people are saying.

About PocketJS and the things being made with it.

PabloW@pablowasserman

I love this. Old hardware, new software.

Original

Me encanta esto. Hardware viejo, software nuevo.

Wang Jack@WangJack845358

This project really is a miracle!!

Original

这个项目的确是个奇迹!!

Buto@ChibiButo

Impressive!

J.R. DeJesus@Jok3r0314

Awesome!!!!

TJ (thaddeus jiang)@ThaddeusJiang

I've been following it for a while, and I'm sure PocketJS is the JS project I've been most excited about since Bun.

Original

看了有一段时间了,我确定 PocketJS 是近几年 bun 之后我最期待的 JS 项目。

Eric Xu (e/Mettā)@xleaps

Yes, I could see the potential from the first glance. The combination of technologies makes a lot of sense, too.

Original

Yes, 从第一眼看到就感受到这是个很有潜力的项目,技术栈的组合也非常合理。

Sponsors

Built full-time, thanks to you.

Sponsors let us work on PocketJS full-time. Help bring more ideas to more screens.

Become a sponsor
Get started

Your first app in a minute.

Solid, Vue Vapor or Octane. Scaffold a project, build it, and put it on a device.

$ bun add -g @pocketjs/cli
$ pocket create my-app
$ cd my-app && bun install
$ bun run build