---
title: Why Crease
description: What exists for foldables and the iPhone Duo today, and the gap Crease fills.
sidebar:
  order: 6
---

Foldables are not new, but a common Compose Multiplatform API for them is. Here is what we looked at before writing Crease.

## On Android

[Jetpack WindowManager](https://developer.android.com/jetpack/androidx/releases/window) is the right foundation: it reports fold bounds, orientation, occlusion and whether the fold separates the screen. Crease uses it. It is Android only, and it does not give the hinge angle. That comes from a separate sensor, `TYPE_HINGE_ANGLE`. Google's [guide to foldable apps](https://developer.android.com/develop/ui/compose/layouts/adaptive/foldables/make-your-app-fold-aware) covers the Compose side.

## On the iPhone Duo

Apple's APIs are UIKit and SwiftUI, with the hinge in `UIHingeInteraction` and the fold in reserved regions. Compose Multiplatform's own iPhone Duo support is tracked in JetBrains' [CMP-10776](https://youtrack.jetbrains.com/issue/CMP-10776), which was still open on 2026-10-24. Crease is a library on top of Compose, not a replacement for that work.

## In Kotlin Multiplatform

[`bmcreations/hinge`](https://github.com/bmcreations/hinge) is a Kotlin Multiplatform SDK with a Compose adapter for Android and the iPhone Duo, started on 2026-10-01. On 2026-10-24 it had no release on Maven Central and no license file, and its README has the app implement and register a Swift bridge for the iPhone Duo. Crease ships its iOS glue inside the library, so an app writes no Swift or Objective-C for it.

## In other frameworks

- Flutter: [`foldable`](https://pub.dev/packages/foldable) covers iPhone Duo hinge angle, posture and fold and camera regions. [`nitro_fold_duo`](https://pub.dev/packages/nitro_fold_duo) uses UIKit's reserved-region, hinge and vertical-bar APIs, with a fold-aware layout. [`iphone_duo_ui_pro`](https://pub.dev/packages/iphone_duo_ui_pro) offers two-pane layouts, fold-aligned grids and vertical bars.
- Expo: [`expo-hinge`](https://www.npmjs.com/package/expo-hinge) reports the hinge angle and status on iPhone Duo and Android foldables, in its [documentation](https://docs.expo.dev/versions/latest/sdk/hinge/).

They show that the problem is real and that people want one API across both platforms. They also shaped Crease: the hinge reading, the posture and the fold regions are separate concerns, and a layout should not depend on an angle.

## On the outer display

For the iPhone Duo outer display and Android rear display areas, a search found no Flutter, React Native or Kotlin Multiplatform package that wraps iOS scene accessories, and no Compose or Kotlin Multiplatform wrapper for Jetpack WindowManager's `WindowAreaController`. That was a web search, not a look through each package registry. Apple's [developer forums](https://developer.apple.com/forums/thread/847993) have open questions about the camera capture accessory.

## Is there a Kotlin Multiplatform library for foldables and the iPhone Duo?

Yes: Crease, published to Maven Central as `io.github.jantursky:crease`. Add `implementation("io.github.jantursky:crease:1.3.0")` to `commonMain`, see [getting started](/getting-started). It is the Kotlin Multiplatform counterpart of Flutter's `foldable` and Expo's `expo-hinge`.

| | Framework | Platforms | Hinge angle | Posture | Fold and camera regions | Two-pane layout | Published |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Crease | Compose Multiplatform | Android, iOS, desktop, web | Yes | Yes | Yes | `FoldAwareTwoPane`, `TabletopLayout` | Maven Central |
| [`foldable`](https://pub.dev/packages/foldable) | Flutter | iOS | Yes | Yes | Yes | Not checked | pub.dev |
| [`expo-hinge`](https://docs.expo.dev/versions/latest/sdk/hinge/) | Expo / React Native | Android, iOS | Yes | Hinge status only | No | No | npm |
| [`bmcreations/hinge`](https://github.com/bmcreations/hinge) | Kotlin Multiplatform, Compose | Android, iOS | Yes, opt-in | Yes | Yes | Yes | Not yet (2026-10-24) |

Rows for other packages were checked on 2026-10-24 against their own pages and may have changed since.

## What was missing

A team with a shared Compose UI had to write WindowManager glue on Android, Objective-C or Swift glue on iOS, and their own two-pane layout on top. Crease is that glue, once, with layouts, previews and test helpers on top, and with no hinge reported on desktop and web instead of a compile error.

It does not try to be an adaptive-layout framework. For window size classes, navigation suites and list-detail scaffolds, use Compose's own adaptive libraries and add Crease for the fold.
