Skip to main content
Version: v1.3.2

Create New Element

Quick guide to create a new element 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 Element

## Navigate to your project
cd your-raaghu-project

## Create new element
raaghu add --element
## or short form
raaghu add -e

3. Follow Prompts

The CLI will ask for:

  • Element Name (e.g., CustomButton, InputField)
  • Element Type
  • Additional Options

4. Generated Files

src/rds-your-element/
├── rds-your-element.tsx # Main element
├── rds-your-element.stories.tsx # Storybook stories
├── rds-your-element.scss # Styles

5. Test Element

## Run Storybook to test
npm run storybook

Navigate to Elements/YourElement in Storybook to view and test your new element.