2D Interactive Playground is a React-based application leveraging the Konva library to create and manipulate interactive 2D elements within a playground environment. This project serves as a dynamic tool for developers and designers who require custom 2D layout editing, with capabilities to drag, resize, rotate, and modify shapes with ease.
- Dynamic Element Manipulation: Drag, resize, rotate, and color elements on the canvas.
- Flexible Shape Library: Easily add and manage rectangles, circles, and lines.
- User-Friendly UI: Intuitive controls for a smooth experience.
- React + Konva Integration: Combines the strengths of React's component-based architecture with Konva’s 2D graphics rendering.
To run this project locally:
- Clone the repository:
git clone https://github.com/Parth-12pm/2D-interactive-Playground-using-React-Konva.git cd 2D-interactive-Playground-using-React-Konva
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open http://localhost:3000 to view it in your browser.
- Adding Shapes: Select shapes from the sidebar to add them to the playground.
- Modifying Elements: Drag shapes to move them around, resize using anchor points, and rotate by adjusting rotation handles.
- Custom Styling: Customize colors and properties directly through the interface.
Contributions are welcome! If you have any suggestions or improvements, feel free to fork the repository and submit a pull request.
- Fork the Project
- Create your Feature Branch (git checkout -b feature/FeatureName)
- Commit your Changes (git commit -m 'Add some FeatureName')
- Push to the Branch (git push origin feature/FeatureName)
- Open a Pull Request
MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.