Create New Component
Quick guide to create a new component using the Raaghu CLI.
Prerequisites
- Raaghu CLI installed globally
- Node.js v20+ and npm
- A Raaghu Design System source code
Steps
1. Install/Update CLI
## Install or update Raaghu CLI
dotnet tool install -g Waiin.Raaghu.Cli
dotnet tool update -g Waiin.Raaghu.Cli
2. Create Component
## Navigate to your project
cd your-raaghu-project
## Create new component
raaghu add --component
## or short form
raaghu add -c
3. Follow Prompts
The CLI will ask for:
- Component Name (e.g.,
DataTable,UserProfile) - Component Type
- Additional Options
4. Generated Files
src/rds-comp-your-component/
├── rds-comp-your-component.tsx # Main component
├── rds-comp-your-component.stories.tsx # Storybook stories
├── rds-comp-your-component.scss # Styles
5. Test Component
## Run Storybook to test
npm run storybook
Navigate to Components/YourComponent in Storybook to view and test your new component.