Reference
UI kit
@doan-labs/duo-uikit: the components and tokens every app on the phone is built from. They already know about the cover and the inner display, so a screen that reads at 387 points grows into the room it gets unfolded.
1import {2Button, Row, Screen, Section, Text, Title, useDisplay3} from '@doan-labs/duo-uikit'45function App() {6const view = useDisplay()7return (8<Screen>9<Title>Field guide</Title>10<Section>11<Row label="Display" detail={view.display} />12<Row label="Fold" detail={<Text value={view.angle} suffix="°" />} />13<Row><Button onClick={save}>Continue</Button></Row>14</Section>15</Screen>16)17}
Version 1.2.0. Apps bundle the kit they compile against, so a new version never changes whether a host can run an installed app. Components accept native attributes, as for the element, animate for the CSS-only presets and xstyle for compiled StyleX extensions, and refuse raw style and className. The showcase composes the kit into small live apps, and the Developer gallery is an installable app that renders every export at both display widths.
Exports
- ButtoncomponentNative button: tinted capsule by default, filled with the link colour, or plain text. Icon-only buttons need aria-label.
- CheckboxcomponentNative checkbox drawn as macOS Calendar's tinted square: hollow at rest, filled
- HStackcomponentA horizontal row of children, centred on the cross axis. The kit had no
- IconButtoncomponentA toolbar button that is only a symbol: the plus, the chevrons, the sidebar
- LargeTitlecomponentThe existing 34-point large app title. It wraps naturally at cover width.
- ListcomponentSemantic list. Use Row as="li" for direct children, or place Sections inside list items.
- MenucomponentThe iOS pop-up menu: a sheet of actions that floats out of the control which
- NavcomponentiOS push navigation: the new page slides in from the right and the one behind
- NavigationLinkcomponentKeyboard-accessible push navigation. The destination renders inside a page with a back button.
- Numcomponent
- PlaceholdercomponentCentred empty, unavailable or loading content harvested from five existing apps.
- RowcomponentGrouped row with an optional leading icon, a secondary line under the label
- ScreencomponentScrolling app content. Exposes display metadata without opening a bridge or starting effects.
- SectioncomponentInset rounded group of rows, retaining the original grouped-list geometry.
- SegmentedcomponentSegmented control: one of a few views or filters, the selected segment raised
- SelectcomponentNative select drawn like `TextField`, so a form's pop-up and its fields line up. Children are `<option>`s.
- SheetcomponentA modal card over the app. It is a non-modal `<dialog>` on purpose:
- TextcomponentInline text or a formatted animated number.
- TextFieldcomponentNative text input over `fill`, the field in a form or a sheet. Any `type`
- TitlecomponentFixed app header, or its compact trailing accessories. Use as="h1" for a semantic heading.
- TogglecomponentNative checkbox styled as the existing iOS switch. Supply a visible label or aria-label.
- VStackcomponentA shrinking vertical stack that fills its flex parent, including the cover display.
- WidgetcomponentHost-rendered declarative snapshot. Refresh remains the app owner's responsibility.
- WidgetLabelcomponentPassive text label using existing widget typography; never fetches or schedules refreshes.
- useDisplayhookCurrent SDK display snapshot. Subscribes only; the app explicitly connects the SDK.
- useNavhookInside a `<Nav>`: `push((back) => <Page title="…" back={back}>…</Page>)`.
- useNavigationhookInside a `<Nav>`: `push((back) => <Page title="…" back={back}>…</Page>)`.
- usePresencehookKeeps a thing mounted for `ms` after `open` drops so its exit animation can
- useWidehookWatches the returned ref's own box and reports whether it is wider than `at`.
- Pagefunction
- SymfunctionAn SF Symbol, tinted by the element's colour through a mask. Decorative by
- animationsvalue
- AnimationNametype
- Apptype
- ButtonPropstypeNative button: tinted capsule by default, filled with the link colour, or plain text. Icon-only buttons need aria-label.
- CheckboxPropstypeNative checkbox drawn as macOS Calendar's tinted square: hollow at rest, filled
- HStackPropstypeA horizontal row of children, centred on the cross axis. The kit had no
- IconButtonPropstypeA toolbar button that is only a symbol: the plus, the chevrons, the sidebar
- LargeTitlePropstypeThe existing 34-point large app title. It wraps naturally at cover width.
- ListPropstypeSemantic list. Use Row as="li" for direct children, or place Sections inside list items.
- MenuEntrytype
- MenuItemtypeOne action. The glyph sits on the leading edge, as iOS 26 draws it; `checked`
- MenuPropstypeThe iOS pop-up menu: a sheet of actions that floats out of the control which
- PagePropstypeOne page in a `Nav`: fixed header with an optional back chevron, scrolling body.
- Pushtype
- NavigationLinkPropstypeKeyboard-accessible push navigation. The destination renders inside a page with a back button.
- PlaceholderPropstypeCentred empty, unavailable or loading content harvested from five existing apps.
- RowPropstypeGrouped row with an optional leading icon, a secondary line under the label
- ScreenPropstypeScrolling app content. Exposes display metadata without opening a bridge or starting effects.
- SectionPropstypeInset rounded group of rows, retaining the original grouped-list geometry.
- SegmentedPropstypeSegmented control: one of a few views or filters, the selected segment raised
- SelectPropstypeNative select drawn like `TextField`, so a form's pop-up and its fields line up. Children are `<option>`s.
- SheetPropstypeA modal card over the app. It is a non-modal `<dialog>` on purpose:
- Aligntype
- Justifytype
- StackPropstypeProps both stacks accept on top of the primitive ones.
- SymPropstype
- TextPropstypeInline text or a formatted animated number.
- TextFieldPropstypeNative text input over `fill`, the field in a form or a sheet. Any `type`
- TitlePropstypeFixed app header, or its compact trailing accessories. Use as="h1" for a semantic heading.
- TogglePropstypeNative checkbox styled as the existing iOS switch. Supply a visible label or aria-label.
- VStackPropstypeA shrinking vertical stack that fills its flex parent, including the cover display.
- WidgetPropstypeHost-rendered declarative snapshot. Refresh remains the app owner's responsibility.
- WidgetLabelPropstypePassive text label using existing widget typography; never fetches or schedules refreshes.
Tokens
Colours, type and easing live in tokens.stylex.ts as StyleX variables. Use them and never a literal: the two displays have different densities, the shell tunes the palette for both, and that rule is what lets a fix in the kit reach every app.