gsap-rcu
v1.0.0
Published
CLI to install animated React and Next.js components powered by GSAP
Maintainers
Readme
RCU – React Component Utility
RCU is a CLI-based component installer for React and Next.js projects. It allows developers to quickly add prebuilt UI components directly into their projects with a single command.
The goal of RCU is similar to modern component CLIs: instead of installing a UI library package, it copies real component code into your project, so you can freely modify and customize it.
RCU components are built with:
- Tailwind CSS
- GSAP animations
- React / Next.js
Features
- CLI-based component installation
- Automatic project detection
- Supports React and Next.js
- Supports JavaScript and TypeScript
- Dynamic component registry
- Component dependency system
- Automatic npm dependency installation
- Overwrite protection
Supported Project Types
RCU automatically detects the project type and installs the correct component version.
| Framework | Language | Installed Variant | | --------- | ---------- | ----------------- | | React | JavaScript | react-js | | React | TypeScript | react-ts | | Next.js | JavaScript | next-js | | Next.js | TypeScript | next-ts |
Installation
Install RCU globally:
npm install -g rcuOr use locally via:
npm linkCLI Commands
Initialize Project
Creates the required structure for components.
rcu initList Available Components
Shows all components available in the registry.
rcu listExample output:
Available components:
button
modal
accordionAdd Component
Install a component into your project.
rcu add buttonThis will copy the component into:
components/ui/button.tsxInteractive Component Selection
If no component is specified:
rcu addRCU will open an interactive selector.
Component Structure
All components are stored in the registry directory.
Example structure:
registry
└ button
├ component.json
├ react-js
│ └ button.jsx
├ react-ts
│ └ button.tsx
├ next-js
│ └ button.jsx
└ next-ts
└ button.tsxEach variant corresponds to a specific framework and language combination.
Component Configuration
Each component contains a component.json file.
Example:
{
"name": "modal",
"dependencies": ["gsap"],
"components": ["button"]
}Fields:
name
Component name.
dependencies
NPM packages required by the component.
Example:
gsapThese dependencies are installed automatically.
components
Other components required.
Example:
modal → depends on → buttonWhen installing modal, RCU will install button first.
Example Installation Flow
Command:
rcu add modalProcess:
- Detect project framework
- Detect language (JS / TS)
- Install component dependencies
- Copy component files
- Install required npm packages
Example result:
✔ button installed (react-ts)
✔ modal installed (react-ts)
Installing dependencies: gsapGenerated Folder Structure
After installation:
components
└ ui
├ button.tsx
└ modal.tsxThese are real editable components, not locked library code.
Philosophy
RCU follows the same philosophy as modern UI component tools:
- Components are copied into your project
- Developers own the code
- Full customization is possible
No vendor lock-in.
Development
To develop the CLI locally:
npm install
npm run build
npm linkNow the CLI command will be available globally.
Contributing
Contributions are welcome.
You can contribute by:
- Adding new components
- Improving animations
- Optimizing CLI features
- Fixing bugs
License
MIT License
