LogoCraftReactNative

CLI

Add CraftReactNative components to your project with the command-line interface.

Pre-requisite

You must run these commands from the root of your React Native project.

The CLI will copy the component files directly into your project, allowing you to customize them as needed.

Available commands

CommandDescription
initInitialize project with themes and dependencies
add [components...]Add one or more components to your project
listShow all available components

init

Initialize your project with the required setup for CraftReactNative UI:

This will:

  • Install necessary dependencies (react-native-reanimated, react-native-gesture-handler, react-native-svg, react-native-unistyles)
  • Create a craftrn-ui folder at your project root with Unistyles and theme configuration
  • Update your main project file to import the configuration
npx @craftreactnative/ui init

Options:

  • --skip-deps - Skip dependency installation

add

Add components to your project

This will:

  • Copy component files to craftrn-ui/components so you can import and customize them
# Add a single component
npx @craftreactnative/ui add button
 
# Add multiple components
npx @craftreactnative/ui add button avatar card

list

Show all available components:

npx @craftreactnative/ui list

On this page