Copy high‑quality React Native UI components into your project in seconds — including icons and theme tokens. The CLI auto‑detects your folder layout and rewrites imports after copying.
npm install -g @dynamiclayer/cli
# Copy a component
dynamiclayer add <component>
# Optional: choose target folders
dynamiclayer add <component> --components=src/components --styles=src/styles --assets=src/assets
Supported components:
alert
avatar
avatargroup
badge
tag
theme
(copies onlystyles/style.js
)
Docs for each component and the CLI are in docs/
:
- docs/alert.md
- docs/avatar.md
- docs/avatar-group.md
- docs/badge.md
- docs/tag.md
- docs/cli.md
- The CLI looks for common roots in your project:
src/components
→src
→app/components
→ project root. - From this, it derives target paths for
components/
,styles/
, andassets/
. - Alternatively, add a
dynamiclayer.config.json
at your project root:
{
"componentsDir": "src/components",
"stylesDir": "src/styles",
"assetsDir": "src/assets"
}
After copying, the CLI automatically fixes import paths in components:
- Imports to
../../styles/style
are rewritten relative to the new location. - Imports to
../../assets/...
(e.g., icons) are mapped to the newassets
path.
your-project/
assets/
icons/
avatarIcon.js
onlineIcon.js
offlineIcon.js
components/
ui/
Avatar.js
Badge.js
styles/
style.js
Components rely on these packages. Install them in your target app (not the CLI):
npm install react-native-safe-area-context react-native-svg react-native-reanimated
MIT — see LICENSE
.