/duology-design:duo-posturesfrom duology-design
Designs iPhone Duo screens for every device pose: closed, open flat, book, tabletop, tent, and flipped. Covers FoldGeometry, FoldRegionsLayout, onHingeChange, and UIHingeInteraction with accessibility rules.
Ships in duology-design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill to decide what a screen does in each way people hold or set down iPhone Duo, then build it. It covers closed, open flat, book, tabletop, tent and flipped, the two layouts Apple singles out (half folded like a book, and set on a table), and the hinge as a source of effects.
Load neighbours when the task needs them: duo-layout (size classes, safe areas, reserved regions in depth), duo-patterns (which layout pattern a screen uses), duo-navigation (bars and sheets), duo-continuity (state through a fold).
Apple calls these "device poses" and describes them with comparisons: "partially folded, like a book", "seated on a table like a laptop", "folded like a tent", "open, turned around". It never says "posture", "tabletop" or "tent mode". Duology uses book, tabletop, tent and flipped as shorthand for those descriptions. None of them is an API, an enum case or a Device Hub button. Never write code that pretends the system reports them. Labels below: measured means we ran it on the iPhone Duo simulator; unverified means we could not confirm it.
.division reserved region. Active division means partly folded. Its shape tells you which way the fold runs (talk 111463, api-index).Add FoldGeometry and FoldRegionsLayout from references/fold-regions.md once per app. If the app already has a FoldGeometry (duo-patterns adds one), keep a single copy, and make sure its init(_:) filters with liesInside(_:of:) as fold-regions.md shows. A copy taken from duo-patterns before v0.2 may lack the filter; add it. Then read the fold with .onFoldChange { fold = $0 } on the view you lay out.
| Pose (Duology word) | Apple's words | Your app is on | Size classes (width, height) | .division region | FoldGeometry |
|---|---|---|---|---|---|
| Closed | closed | Outer display | compact, regular in portrait; compact, compact in landscape (111461) | none | frame == nil |
| Tent | "folded like a tent", "standing on its edges" | Outer display, held sideways (our reading of Apple's drawing and talk 111461; unverified) | compact, compact | none | frame == nil |
| Open, flat | "open in a wide layout", "open in a tall layout" | Inner display | regular, regular (measured held wide) | inactive | frame != nil && !isActive |
| Book | "partially folded, like a book" | Inner display, held wide | regular width expected (unverified) | active, top to bottom | isActive && isVertical |
| Tabletop | "seated on a table like a laptop" | Inner display, held tall | regular width expected (unverified) | active, side to side | isActive && !isVertical |
| Flipped | "open, turned around" | Outer display, phone still open (camera apps) | compact width (derived; unverified) | none | frame == nil |
What this means for code:
DeviceHinge.Status..occlusion (see duo-layout)..includeInactive, so folding later moves nothing.fold.isActive && fold.isVertical.fold.isActive && !fold.isVertical (the frame is wider than tall).AVCaptureDeviceDirectionCoordinator (AVKit) which cameras face forward. Mirror the preview yourself when a rear camera faces the person. Never infer direction from position == .back (api-index).Video in the top region and the same controls in the bottom region when the phone sits folded on a table. Folded like a book, the video goes leading and the controls trailing. Closed or flat, the controls float over the video. One layout, so neither view is rebuilt.
import AVFoundation
import SwiftUI
// requires: FoldGeometry, FoldRegionsLayout (references/fold-regions.md)
// requires: PlayerSurface, PlayerControls (references/tabletop-media.md)
@available(iOS 27.1, *)
struct TabletopPlayer: View {
let player: AVPlayer
@State private var fold = FoldGeometry()
@Environment(\.accessibilityReduceMotion) private var reduceMotion
var body: some View {
FoldRegionsLayout(fold: fold, unfolded: .overlay) {
PlayerSurface(player: player) // first: what people watch
.ignoresSafeArea()
PlayerControls(player: player) // second: what people touch
}
.onFoldChange { fold = $0 }
// A short slide. With Reduce Motion the controls move without animating.
.animation(reduceMotion ? nil : .smooth(duration: 0.3), value: fold)
.background(.black)
}
}
Full code, the video call variant (remote video on top, self view and call controls below) and the system alternative (ArrangementView with .overlay): references/tabletop-media.md.
What people read goes leading and what they touch goes trailing, with the fold as the divider. Flat, the same split sits on the fold line, so folding changes nothing but the gap. Closed, the two views stack, or sit side by side in landscape.
import SwiftUI
// requires: FoldGeometry, FoldRegionsLayout (references/fold-regions.md)
// requires: CountdownFace, CountdownControls (references/book-two-region.md)
@available(iOS 27.1, *)
struct CountdownScreen: View {
@State private var fold = FoldGeometry()
@State private var remaining = 300
@State private var isRunning = false
var body: some View {
FoldRegionsLayout(fold: fold, unfolded: .split) {
CountdownFace(remaining: remaining)
CountdownControls(remaining: $remaining, isRunning: $isRunning)
}
.onFoldChange { fold = $0 }
.task(id: isRunning) {
guard isRunning else { return }
while remaining > 0 {
// Cancelled (paused, or the view went away): stop, keep the time.
do { try await Task.sleep(for: .seconds(1)) } catch { return }
remaining -= 1
}
isRunning = false
}
}
}
When to pick .split or .overlay, and the full code: references/book-two-region.md.
onHingeChange(isEnabled:_:) (SwiftUI) and UIHingeInteraction (UIKit) report a status (closed, partiallyOpen, fullyOpen) and a live angle. Apple shows them driving a wallpaper zoom and a guitar's pitch bend, and keeps layout for regions and arrangements (talk 111464).
hinge is nil without a hinge. Reset the effect when the status is not partiallyOpen.status. The angle's update rate and precision are system policy (UIKit's UIHinge.h).import SwiftUI
@available(iOS 27.1, *)
struct HingeZoomArtwork: View {
let image: Image
@State private var zoom: CGFloat = 1
@Environment(\.accessibilityReduceMotion) private var reduceMotion
var body: some View {
// Color.clear takes the space offered; the image fills it and is clipped to it.
Color.clear
.overlay {
image
.resizable()
.scaledToFill()
.scaleEffect(reduceMotion ? 1 : zoom)
}
.clipped()
.accessibilityHidden(true)
.onHingeChange(isEnabled: !reduceMotion) { _, context in
guard let hinge = context.hinge, hinge.status == .partiallyOpen else {
zoom = 1
return
}
// 180 degrees is flat. Up to 8 percent larger as the phone closes.
zoom = 1 + 0.08 * (1 - min(max(hinge.angle.degrees / 180, 0), 1))
}
}
}
Hinge input with an on-screen alternative, UIKit, and testing angles: references/hinge.md.
iOS 27.1 iPhone Duo simulator, read from the reserved regions with the gallery app's region overlay and our probes (16 to 19 October 2026). Frames are in a view that fills the window. Full detail: duo-patterns two-page measurements and references/measurements.md.
| Pose | Window | .division region | Camera (.occlusion, our reading) |
|---|---|---|---|
| Closed | 466 × 678 pt | none | outer camera, active, 37 × 37 pt at (400, 29) |
| Open, flat, held wide | 951 × 669 pt | inactive, 40 × 669 pt at (455, 0) | inner camera, inactive, 58 × 37 pt at (677, 21) |
| Book | 951 × 669 pt | active, 40 × 669 pt at (455, 0) | inner camera, inactive, 58 × 37 pt at (677, 21) |
| Tabletop | 669 × 951 pt | active, 669 × 40 pt at (0, 455) | inner camera, inactive, 37 × 58 pt at (611, 677): right edge, bottom half |
isActive; the frame stays put. Read it with .includeInactive and a split lands in the same place flat and folded.onGeometryChange; don't read once in onAppear.Read traitCollection size classes and query reservedRegions(kind: .division, options: .includeInactive) in the view's own layoutSubviews. That is enough: UIKit runs that layoutSubviews again when the fold turns active or inactive (measured; viewDidLayoutSubviews not yet checked). Don't trigger layout from UIHingeInteraction; when folding, the status changes 0.7 to 0.9 s before the region does. Keep the hinge for effects. Code: references/uikit.md and references/hinge.md.
In Device Hub, under the bezel: Closed, Partially Open, Open, and the rotate buttons. Option-drag the slider for any angle (Device Hub).
| Pose | Device Hub |
|---|---|
| Closed, then tent | Closed; then rotate for landscape |
| Open, wide and tall | Open; rotate for tall |
| Book | Partially Open, held wide |
| Tabletop | Partially Open, then Rotate Right once (Rotate Right three more times returns to wide) |
| Hinge effects | Partially Open, then Option-drag the slider |
| Flipped | Not in Device Hub; use a device |
simctl has no pose command. Device Hub's buttons can be pressed through the macOS Accessibility API, but only after the user gives that permission (AGENTS.md). Otherwise ask the user to press the pose.
.division. No hinge status or angle, device orientation, UIScreen.main or idiom picks a layout.Layout, no if swapping view trees).partiallyOpen, and safe when hinge is nil.@available or if #available when the app deploys lower.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
iphone-duo, foldable, device-poses, hinge-effects, fold-geometry
8 skills in this plugin
/duo-accessibilityMakes iPhone Duo apps work with VoiceOver, Dynamic Type, Reduce Motion, Increase Contrast, hardware keyboards, Switch Control and Voice Control on both displays. Use it when VoiceOver reads two panes row by row or loses its place after the phone folds or unfolds, when text truncates or clips on the 5.4-inch outer display at large text sizes, when a hinge effect or resize animation ignores Reduce Motion, when colours fail contrast, when keyboard shortcuts or focus don't work, or when you add accessibility labels, identifiers or audits. Covers accessibilityElement(children: .contain), accessibilitySortPriority, AccessibilityFocusState with a delayed move after a size-class change, AnyLayout and ViewThatFits reflow with isAccessibilitySize, ScaledMetric, accessibilityReduceMotion with onHingeChange, colorSchemeContrast, keyboardShortcut, accessibilityInputLabels, modifiers before .position, Accessibility Inspector, performAccessibilityAudit and XCUIDevice voiceOverService UI tests on the iPhone Duo simulator./duo-design-reviewReviews screenshots, simulator captures and Figma frames for iPhone Duo, Apple's foldable, against a 15-point checklist (letterboxing, state lost on fold and unfold, sizing from UIScreen.main, text or buttons in the fold via reservedRegions .division and .occlusion, odd grid columns, vertical toolbars with symbols and titles, tabletop and book layouts with ArrangementView overlay, camera preview rotation, outer display feature parity, multiple windows with UIWindowScene.ActivationAction, transitions, 44 pt touch targets, hardware keyboard, drag and drop) and writes findings with severity, rule, where and fix. Use it when someone asks to critique, audit or review a design, mockup, concept or Dribbble shot for the foldable, the outer display or the inner display, or asks what breaks when the phone is closed, open, partly folded like a book, propped on a table, in Split View or under Picture in Picture.npx claudepluginhub kimeur/duology --plugin duology-designOther plugins' skills for the same job