Skip to content
Sign upPro
FramesFold frameMenu

Fold frame (Pro)

ProIncluded in $99

A book style foldable with two live displays. Shut, the small cover display; open, one wide display with two apps side by side; standing like a book; and the back with its camera plateau. It folds between them in real 3D on a spring.

ProA book style foldable: the cover display says the brief is ready, then it unfolds into the chat and the brief side by side, stands like a book and turns round.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/fold-frame

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { FoldFrame } from "@/components/ui/chatcn/pro/fold-frame"

<FoldFrame
  width={720}
  posture={open ? "open" : "closed"}
  cover={<LockScreen />}
  start={<Chat />}
  end={<Artifact />}
/>

Each screen half renders at a 472 px wide viewport and scales with the frame, so one layout fits the cover display and either half of the inner one. start and end are two apps side by side; inner is one app across both halves at 944 px. The safe area insets reach your content as --chatcn-safe-top, -right, -bottom and -left: the inner status bar sits in the top corner, the cover's around the camera hole.

Change posture and the device folds on a critically damped spring: the half on the table stays put while the other swings up toward the camera, darkening as it turns away from the light, and the spine grows out of the hinge as it shuts. The cover display wakes as it comes round. Set angle, 0 shut to 180 flat, to drive the hinge yourself from a scroll position or a slider.

width is the open device. Shut, the frame is about half as wide and just as tall, so the same width keeps the same scale in every posture. The frame takes the footprint of its posture; put it in a box the size of the open device when the posture changes in place.

Examples

Every posture

ProShut, open, standing, the back, halfway through a fold, one app across both halves, the finishes and phone width.

Props

PropTypeNotes
posture"closed" | "open" | "stand" | "back"Default open
anglenumber0 shut to 180 flat. Follows at once, no spring
widthnumberThe open device, in px. Default 720
coverReactNodeThe cover display, 472 px wide
start, endReactNodeThe two halves of the inner display, 472 px each
innerReactNodeOne app across both halves, 944 px. Wins over start and end
finish"auto" | "silver" | "graphite" | "black" | "white"Default auto: silver on light, graphite on dark
statusBar, timeboolean, stringDefault true and 10:24
homeIndicator, crease, buttonsbooleanDefault true
shading, shadow, glarebooleanDefault true, true, false
screenClassName, coverClassNamestringFor a background or dark on either display
onSettle(posture) => voidWhen a fold comes to rest

Accessibility

  • The display that is not in use is inert: shut, the inner halves; open or standing, the cover. Focus and screen readers only reach what is on screen.
  • While inner spans both halves, the start half shows an inert, hidden copy during a fold; the live app is the one on the end half.
  • The hardware is decorative and hidden from assistive technology. The frame adds no controls of its own.
  • Reduced motion: the device does not fold. It cuts to the new posture with a 150 ms fade.
  • Under forced-colors the body and both displays keep a system outline.