React-Tailwind-Builder-Drag-Drop
A drag-and-drop web builder that enables users to design layouts with React and TailwindCSS. Currently under development, this app allows you to create nested components, apply styles to multiple nodes at once, and export the layout as React code. You can check the live version here.
Table of Contents
Features
- Drag-and-Drop Layouts
- Nested Components
- Multi-Node Styling
- Live Preview with TailwindCSS
- React Code Export
Installation
- Clone the repository:
git clone https://github.com/themrsami/React-Tailwind-Builder-Drag-Drop.git
- Navigate to the project directory:
cd React-Tailwind-Builder-Drag-Drop
- Install dependencies:
pnpm install
Usage Guide
Selecting Nodes
Open the application in development mode by running:
pnpm dev
or you can also use
pnpm dev --turbo
Navigate to http://localhost:3000
in your browser.
Use the Node Tree tab to select a specific node or child component. Each node represents a distinct part of your layout that you can style individually.
Adding Nested Nodes
- After selecting a node, add nested child nodes within it by using the options available in the Node Tree tab.
- You can nest multiple layers, allowing you to create complex layouts with ease.
Multi-Node Selection and Styling
- To style multiple components at once, use multi-select by holding down the modifier key (usually
Ctrl
or Cmd
).
- Apply any class or styling option, and it will instantly affect all selected nodes, making it easier to ensure a uniform design.
Modifying Layout and Color
- After selecting the nodes, click on Layout or Color tabs.
- These tabs offer various styling and layout options like padding, margin, color, etc., allowing you to customize each component visually.
Exporting Component Code
- Once your design is complete, go to the Code tab to view the generated React component code.
- Simply copy the code and paste it into your project for seamless integration.
Renaming Components
- At the top of the workspace page, there’s an input field where you can rename your component.
- Enter any name, which will update the component’s title in the export.
Contributing
This project is still in development, and we welcome contributions! To contribute:
- Fork the repository.
- Create a branch for your feature or bug fix:
git checkout -b feature/your-feature-name
- Make your changes and commit with clear, descriptive messages.
- Push to your branch:
git push origin feature/your-feature-name
- Open a pull request on the main repository.
Please ensure your code follows the style and conventions of the project.
License
This project is licensed under the MIT License.