Reference
Every registry item is a folder of plain files. This guide walks through adding one, from folder to pull request.
git clone https://github.com/Imdvlpr99/nativra.git
cd nativra
pnpm install
pnpm buildregistry/default/components/rating-stars/
├── item.json # metadata, dependencies, files
├── docs.mdx # Markdown shown on the docs page
├── nativewind/
│ └── RatingStars.tsx
└── stylesheet/
└── RatingStars.tsxThe folder name must equal the item's id.
{
"id": "rating-stars",
"name": "Rating Stars",
"description": "A star rating display and input.",
"type": "component",
"status": "beta",
"version": "0.1.0",
"stylingTargets": ["nativewind", "stylesheet"],
"platforms": { "android": true, "ios": true, "expoGo": true },
"files": [
{ "path": "nativewind/RatingStars.tsx", "target": "nativewind" },
{ "path": "stylesheet/RatingStars.tsx", "target": "stylesheet" }
],
"registryDependencies": [{ "id": "text", "registry": "default" }],
"npmDependencies": [],
"tags": ["rating", "input", "review"],
"docsPath": "docs.mdx"
}The NativeWind and StyleSheet files export the same component with the same props. Import shared code through the canonical aliases — @/components/ui, @/lib/utils, @/hooks — so the CLI can rewrite them to each user's paths.
docs.mdx is plain Markdown: a short usage example, variants and accessibility notes. It is rendered on the item's page.
node scripts/build-registry.mjsThe build fails if the schema is invalid, the id doesn't match the folder, a dependency doesn't exist, or a file targets an undeclared styling target.
accessibilityRole and a label, and have a touch area of at least 44×44pt (use hitSlop for smaller visuals).allowFontScaling={false}; text respects Dynamic Type.any without a comment explaining why.npmDependencies and justified in the PR.