CLI Usage
Add StarKit components to your project via command line.
StarKit provides a built-in CLI to easily add individual components directly into your project. This is especially useful if you want full control over the component source code.
Initialization
To install all components and styles in one go:
npx starkit-ui initAdd Specific Component
Use the following command to run the interactive prompt or pass a component name:
npx starkit-ui add [component-name]For example, to add the Button component:
npx starkit-ui add ButtonHow it works
When you run the command, StarKit CLI will:
- Detect your project structure (looks for a
srcdirectory). - Copy the component's
.tsxand.cssfiles intocomponents/starkit/[ComponentName]. - Automatically copy
tokens.cssandshared.cssif they don't already exist.
Next Steps
After adding your first component, make sure you import the CSS files in your main layout or entry file:
import "@/styles/tokens.css"; import "@/styles/shared.css";
★ GitHub