Installation
How to install dependencies and structure your app.
- 1
Initialize nativecn
Run the following command in your project directory:
npx nativecn init
- 2
Include global styles
After initialization, make sure to include the
global.css
file inside your root layout.import "../global.css";
- 3
Configure path aliases:
This is how I configure it in
tsconfig.json
"compilerOptions": { "paths": { "@/*": ["./*"] } }
- 4
Adding Components
You can easily add specific components to your project using the
add
command:npx nativecn add [Component]
For example, to add the Text component:
npx nativecn add Text
Pro Tip
Explore our component library to find the perfect building blocks for your app. Each component is designed to be flexible and customizable.