Platform · SDK · UI kit
Duo,
taken apart.
Six layers. Hover to find one, click to open it.
The stack
The phone, in parts
How we build it
Four rules,
no exceptions.
- 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.
useWide · Push · Row · LargeTitle
One layout, both displays.
Rings · Bars · Num
Rings that fill like today did.
A real navigation stack.
Segmented · Button · Checkbox · IconButton
Controls that answer.
colors
Every system hue.
Widgets on real glass.
Menus that float out of their control.
Forms, fields and sheets.
Dynamic Type, every step.
132 SF Symbols, tinted by colour.
SDK · Buttons and sensors
Every button
is an event.
One call, os.device.on. Press the phone; every number here is live.
- waiting for the phone to speak…
01 · 'volume'
Volume, as a controller
The press is yours. No HUD, no ringer.
1let score = 02os.device.on('volume', (e) => {3if (e.action !== 'press') return4score += e.button === 'up' ? 1 : -15})
- waiting for the first event…
Top edge caps, or ↑ ↓
02 · 'camera-control'
Camera Control: press, slide, release
Press, slide, release. Camera stays shut.
1os.device.on('camera-control', (e) => {2if (e.action === 'press') focus()3if (e.action === 'slide') zoom = 1 + e.offset * 44if (e.action === 'release') shoot()5})
- 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.
1os.device.on('side', (e) => {2// the phone still sleeps and wakes3held = e.action === 'press'4})
- 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.
1os.device.on('orientation', ({ yaw, hinge }) => {2compass.rotate = yaw3layout = hinge < 120 ? 'tent' : 'flat'4})
- waiting for the first event…
Drag the phone, or use the controls
05 · 'switches'
The switches, read-only
Control Center, read-only.
1os.device.on('switches', (s) => {2switch (true) {3case s.airplane: return show('Airplane Mode')4case !s.wifi && !s.cell: return show('Offline')5case !s.wifi: return show('On cellular')6default: return show('On Wi-Fi')7}8})
- 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.
- 01'volume'0
- 02'camera-control'0
- 03'side'0
- 04'orientation'0
- 05'switches'0
0 real payloads, exactly what an app receives.