@nativecn/cli
v0.3.7
Published
CLI tool for initializing and managing NativeCN components in React Native projects
Downloads
49
Maintainers
Readme
@nativecn/cli
A CLI tool for initializing and managing NativeCN components in React Native projects.
Installation
npm install @nativecn/cli
# or
npx @nativecn/cli [command]Usage
Initialize NativeCN in your project
npx @nativecn/cli initThe init command will:
- Detect if your project uses NativeWind or StyleSheet
- Create a nativecn-preset.js file with theme configuration
- Add components directory structure
- Install essential dependencies
- Create utility functions
Add components to your project
npx @nativecn/cli add button input cardOptions:
--dir <directory>- Target directory for components (default: './components/ui')--overwrite- Overwrite existing components
Generate NativeCN preset file
npx nativecn presetCreates a nativecn-preset.js file with default theme colors.
Available Components
button- A customizable button component with different variants, sizes and statesaccordion- A vertically stacked set of interactive headings that reveal or hide associated contentalert- A component that displays a brief, important message to get users' attentionalertdialog- A modal dialog that interrupts the user with important content and expects a responseavatar- An image component used to represent a user, with a fallback for showing initialsbadge- A small visual indicator for highlighting status, labels or countsbreadcrumb- A navigation component that shows the current location in a hierarchical structureaspectratio- A component to maintain consistent width/height ratios across different screen sizescard- A container component that groups related content and actionscarousel- A slideshow component for cycling through elements like images or slides of contentinput-otp- A one-time password input component with individual character boxes and auto-focusskeleton- A placeholder loading component that animates to indicate content is being loaded- And more to come!
License
MIT
