Back to ✨ Feature Scaffolding

Scaffold New Component

ReactProductivityScaffolding
---
description: Quickly generate a new React component structure
---

1. **Create Directory**:
- Create a folder for the component.
// turbo
- Run mkdir -p src/components/NewComponent

2. **Create Component File**:
- Create the main file with boilerplate code.
// turbo
- Run printf "export const NewComponent = () => {\n return (\n <div className='p-4'>\n <h1>NewComponent</h1>\n </div>\n );\n};" > src/components/NewComponent/index.tsx

3. **Pro Tips**:
- Use a VS Code snippet to automate the typing.
- Consider using a tool like plop.js for advanced scaffolding templates.
By Antigravity Team

How to Use This Workflow

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/workflows/
  3. Save the file as scaffold-new-react-component-structure.md
  4. In Antigravity, type /scaffold_new_react_component_structure or just describe what you want to do

Learn more about workflows →

Related Workflows

Recommended Rules

View more rules →

Recommended MCP Servers

View more MCP servers →

Take It Further

Maximize your productivity with these powerful resources

📋

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
📖

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide