Platform · SDK · UI kit

Duo,
taken apart.

Six layers. Hover to find one, click to open it.

The stack

WindowShellOS × 2RuntimeAppSDK + kitDuoa stranger's appone port

The phone, in parts

Windowthe frame it lives inShellthe body you can turnOS × 2a home screen on each displayRuntimethe guard at the doorAppa stranger's code, walled offSDK + kitwhat an app is given

How we build it

Four rules,
no exceptions.

430 pt600387useWide()false
430 pt
Width
430 pt
useWide()
false
Columns
1
List
387 pt

@doan-labs/duo-uikit · v1.2.0 · 64 exports

24 components that
already know the phone folds.

See all components

SDK · Buttons and sensors

Every button
is an event.

One call, os.device.on. Press the phone; every number here is live.

os.device.onconnecting…
  1. waiting for the phone to speak…

01 · 'volume'

Volume, as a controller

The press is yours. No HUD, no ringer.

app.ts
1let score = 0
2os.device.on('volume', (e) => {
3 if (e.action !== 'press') return
4 score += e.button === 'up' ? 1 : -1
5})
e.button
e.action
-
score
0
  1. waiting for the first event…

Top edge caps, or ↑ ↓

02 · 'camera-control'

Camera Control: press, slide, release

Press, slide, release. Camera stays shut.

app.ts
1os.device.on('camera-control', (e) => {
2 if (e.action === 'press') focus()
3 if (e.action === 'slide') zoom = 1 + e.offset * 4
4 if (e.action === 'release') shoot()
5})
e.action
-
e.offset
-
zoom
1.0×
shots
0
  1. waiting for the first event…

Lower right cap, drag it, or C

03 · 'side'

The side button, heard

Heard, never taken. The phone still sleeps.

app.ts
1os.device.on('side', (e) => {
2 // the phone still sleeps and wakes
3 held = e.action === 'press'
4})
e.action
-
held
false
presses
0
  1. waiting for the first event…

Upper right cap, or L

04 · 'orientation'

The pose, every frame it changes

Turn and hinge, in degrees, once a frame.

app.ts
1os.device.on('orientation', ({ yaw, hinge }) => {
2 compass.rotate = yaw
3 layout = hinge < 120 ? 'tent' : 'flat'
4})
yaw
-
hinge
-
from above
-
  1. waiting for the first event…

Drag the phone, or use the controls

05 · 'switches'

The switches, read-only

Control Center, read-only.

app.ts
1os.device.on('switches', (s) => {
2 switch (true) {
3 case s.airplane: return show('Airplane Mode')
4 case !s.wifi && !s.cell: return show('Offline')
5 case !s.wifi: return show('On cellular')
6 default: return show('On Wi-Fi')
7 }
8})
show
-
  1. waiting for the first event…

Tap Wi-Fi, Airplane Mode or the torch

SDK · The whole surface

One call. Five events.
No manifest entry. No mocks.

  1. 01'volume'0
  2. 02'camera-control'0
  3. 03'side'0
  4. 04'orientation'0
  5. 05'switches'0

0 real payloads, exactly what an app receives.