Skip to main content

Installation

bun add nitro-view-shot
bun run nitro-ui prepare

The NitroUI CLI finds the package through its nitro.json, generates its bindings with the app's Nitrogen, links its Swift package into the iOS build, and links its Kotlin sources and Gradle dependencies into the Android runtime library. There is no manual native setup.

Peer dependencies​

PackageRange
nitro-ui-renderer>=0.3.0
react>=19.0.0

Pin nitro-core​

The package depends on nitro-core 1.0.0-alpha.nightly.138.g43e09c161101 exactly. The NitroUI CLI requires every module to resolve the same nitro-core as the SDK.

:::warning NitroUI 0.3.0 pins another nightly NitroUI 0.3.0 pins nitro-core .137. An app on a NitroUI release that pins a different nightly must override both nitro-core and nitrogen in its package.json. :::

package.json
"overrides": {
"nitro-core": "1.0.0-alpha.nightly.138.g43e09c161101",
"nitrogen": "1.0.0-alpha.nightly.138.g43e09c161101"
}

Run bun install and bun run nitro-ui prepare again after adding the overrides.

Next​

Quick start: capture a view and encode it as PNG.