@craftreactnative/ui
v1.0.9
Published
CLI for adding React Native UI components built for Unistyles
Maintainers
Readme
CraftReactNative UI CLI
A CLI tool for adding CraftReactNative UI components to your React Native projects. Built for Unistyles.
Quick Start
- Initialize your project with themes and dependencies:
npx @craftreactnative/ui init- Add components to your project:
npx @craftreactnative/ui add Button
npx @craftreactnative/ui add Avatar Card
# or install all components at once
npx @craftreactnative/ui add --allCommands
init
Initialize your project with Unistyles themes and install required dependencies.
npx @craftreactnative/ui initOptions:
--skip-deps- Skip installing dependencies
list
List all available components.
npx @craftreactnative/ui list
# or
npx @craftreactnative/ui lsadd [components...]
Add one or more components to your project.
npx @craftreactnative/ui add Button
npx @craftreactnative/ui add Avatar Card Slider
# or install all components at once
npx @craftreactnative/ui add --allOptions:
--force- Overwrite existing components--all- Install all available components
Available Components
Avatar- User profile avatarsBottomSheet- Modal bottom sheetsButton- Primary action buttonsButtonRound- Circular action buttonsCard- Container cardsCheckbox- Checkboxes with animationsContextMenu- Context menusCounter- Number input countersInputOTP- OTP/PIN input fieldsInputSearch- Search input fieldsInputText- Text input fieldsListItem- List itemsPasscodeEntry- Passcode entry interfacePhotoCarousel- Image carouselsRadio- Radio buttonsSlider- Value slidersSliderDual- Range slidersSwitch- Toggle switchesText- Styled text components
Prerequisites
Your project needs these dependencies:
npm install react-native-unistyles@^3 react-native-edge-to-edge [email protected] react-native-gesture-handler@^2 react-native-reanimated@^3 react-native-svg@^14The CLI will install these automatically when you run init, unless you use --skip-deps.
How It Works
This CLI copies component source code directly into your project, giving you:
- ✅ Full control over the component code
- ✅ No runtime dependencies for the components
- ✅ Easy customization without breaking updates
- ✅ TypeScript support out of the box
Project Structure
After running init, you'll have:
your-project/
├── craftrn-ui/
│ ├── themes/
│ │ ├── config.ts
│ │ └── unistyles.ts
│ └── components/
│ └── [added components]Documentation
License
MIT License - see the LICENSE file for details.
Repository
This CLI is part of the CraftReactNative UI project.
