sliceit
v1.1.0
Published
A CLI tool to generate React components with custom templates (JS, JSX, TSX, CSS, SCSS, Styled Components)
Downloads
37
Maintainers
Readme
🧩 sliceit – React Component Generator CLI
sliceit is a lightweight and powerful CLI tool for generating complete React component slices — including JSX, CSS, and optional test files — in seconds.
Save time, stay consistent, and boost your productivity while building modern React apps.
🚀 Features
- 🔧 Quickly scaffold React components
- 🎨 Includes a CSS file with basic structure
- 🧪 Optionally generate a Jest/RTL test
- 📁 Creates everything in its own component folder
- 💡 Easy to use, minimal setup
📦 Installation
npm install -g sliceit🛠️ Usage
sliceit create <ComponentName> [--jsx | --tsx | --js] [--css | --scss | --styled] [--with-test]sliceit create <ComponentName> - this asks for prompt creation📌 Notes
- 📁 The component folder will be created in the current working directory.
- ✅ Make sure you're in the correct folder before running the command.
📄 Example
sliceit create Button --jsx --styled --with-testGenerates:
Button/
├── Button.jsx
├── Button.styled.js
├── __tests__/
│ └── Button.test.jsx⚙️ Configuration
You can optionally configure sliceit with a config file in your project root to avoid passing flags each time.
➕ Example: sliceit.config.json
{
"template": "tsx",
"style": "scss",
"withTest": true
}Default command will pick up tags from config file. If there is no config file it will start default prompt.
sliceit create Button🙌 Support
If you find SliceIt helpful, consider supporting its development:
Thank you for your support!
🧠 Future Plans
🗂️ Choose between different folder structures or templates
📦 Component export indexing
🧩 VS Code Extension
🔌 Plugin system for advanced customization
📚 Storybook generation (planned for v2)
