On this page

apps/example is a NitroUI app structured like HeroUI Native’s example app: a catalog list, one route per family, and floating switches for light, dark and Liquid Glass. Every catalog family has a demo screen with its variants, sizes and states. The screenshots and recordings on this site come from it.

Run it

pnpm install                                   # runs `nitro-ui prepare` for the app
pnpm --filter example ios --device <simulator-udid>

You need Xcode and an iOS 26 simulator. The app’s bundle id is dev.zietec.nitroui.example.

How it is organized

Path What it holds
src/App.tsx ThemeProvider and the navigation: a Components tab (catalog, component screen) and a Theme tab.
src/screens/CatalogScreen.tsx The list of families, grouped by category, built from the kit’s catalog.
src/screens/ComponentScreen.tsx One family’s demo inside an AgentProvider and AgentScope, with the floating controls.
src/screens/ThemeScreen.tsx The tokens: colors, intents, type scale, radius, spacing and materials.
src/demos/<slug>.tsx One route file per family (51 of 51 built). In finished demos, the first section is the most representative look so screenshots capture the top of the page.
src/shell/ DemoPage, DemoSection (with an optional colorful backdrop for glass), ControlBar, PendingDemo.
src/settings.ts The light/dark and glass on/off settings, shared by every screen.
src/launch.ts Launch arguments for automation.
__tests__/ iOS harness tests (51 of 51 catalog families).

Finished demos use DemoSections for variants, sizes, states, a controlled example with a live readout, a Liquid Glass section over a backdrop for glass families, and a controller section with buttons that drive the api. Demo strings go through the app’s defineStrings catalog.

The floating controls

Every component screen has a floating glass bar with two switches: Light/Dark flips the scheme for the whole app (native pickers and sheets follow through Appearance.setColorScheme), and Glass turns Liquid Glass on and off so you can compare a family with its opaque fallback.

Launch arguments

Screenshots and recordings open the app directly on a screen, in a chosen look, without touching it:

xcrun simctl launch <device> dev.zietec.nitroui.example \
  -exampleRoute button -exampleScheme dark -exampleGlass off
Argument Values Effect
-exampleRoute a family slug, such as date-picker Opens that family’s screen instead of the catalog. Unknown slugs open the catalog.
-exampleScheme light, dark Starts in that scheme. Without it, settings.ts samples Appearance.getColorScheme() once at startup (later OS appearance changes do not update it; use the Light/Dark button to switch).
-exampleGlass off Starts with Liquid Glass off. Glass is on otherwise.
-exampleTour catalog, glass, theme, controls, overlays Runs the matching scripted recording tour defined in src/tour/scripts.ts.

The slug of each family is in its page’s import path: nitro-ui-sdk/<slug>.

Agents in the example app

Each component screen creates its own agent registry, mounts the demo under AgentProvider with the route key and an AgentScope with the family slug, and sets the registry’s foreground when the screen gains or loses focus. Every registered demo control inside that Demo is therefore available to snapshot, query and act, scoped to the family slug. The floating Light/Dark and Glass ControlBar sits outside the family’s AgentScope and does not register with the agent registry, so queries scoped to the family see only the demo’s controls.