sliceit

1.1.0 • Public • Published

🧩 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-test

Generates:

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:

Buy Me A Coffee

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)

Package Sidebar

Install

npm i sliceit

Weekly Downloads

6

Version

1.1.0

License

MIT

Unpacked Size

10.1 kB

Total Files

9

Last publish

Collaborators

  • elpajone