Get started · 02
Add Nativra to a new or existing project. Nothing in your app changes until you add a component.
StyleSheet. init picks one from what you have installed.Skip this if you already have a project.
npx create-expo-app@latest my-appnpx nativra-cli initinit detects Expo or bare React Native, NativeWind, a src/ folder, your package manager and your tsconfig.json path alias, then asks you to confirm. Pass --yes to accept the detected values.
It writes nativra.json and adds .nativra/ (local update backups) to .gitignore.
npx nativra-cli add buttonThis writes components/ui/Button.tsx along with what it depends on: the use-theme-colors hook and the default zinc theme. Each file's hash goes into nativra.lock.json.
import { View } from "react-native";
import { Button } from "@/components/ui/Button";
export default function Installation() {
return (
<View style={{ flex: 1, justifyContent: "center", padding: 24 }}>
<Button variant="primary" onPress={() => console.log("pressed")}>
Continue
</Button>
</View>
);
}Commit nativra.json, nativra.lock.json and the new files. The lockfile is how later update and diff runs recognise your edits.
doctor validates nativra.json, your versions against the tested range, the TypeScript alias and the NativeWind config. See Doctor & audit.
npx nativra-cli doctor