A powerful web-based tool for creating custom shapes by connecting dots on a grid and generating corresponding CSS code. Perfect for designers and developers who want to create unique clip-path shapes and SVG patterns.
- 40x40 Grid: High-resolution dot grid for precise shape creation
- Smart Auto-Connect: Click two dots to automatically select all dots in a straight line between them
- Visual Feedback: Real-time visual feedback with smooth animations and hover effects
- Responsive Design: Works seamlessly on desktop and mobile devices
- Click to Select: Simple click interface to select individual dots
- Line Drawing: Automatic line drawing using Bresenham's algorithm
- Shape Management: Create, clear, and undo shapes with ease
- Multi-Shape Support: Create multiple shapes in a single session
- CSS Clip-Path: Automatically generates CSS
clip-pathpolygon code - SVG Support: Alternative SVG polygon code generation
- Responsive CSS: Generated code uses percentages for responsive designs
- Multiple Backgrounds: Support for gradients and image backgrounds
- Enter: Create shape from selected dots
- Escape: Clear current selection
- Ctrl + ↑/↓: Scroll the dot grid panel
- Delete/Backspace: Remove last selected dot
- Download the
index.htmlfile - Open it in any modern web browser
- Start creating shapes immediately!
- Select Dots: Click on dots to select them (they turn yellow)
- Auto-Connect: Click a second dot to automatically connect with a straight line
- Create Shape: Press Enter or click "Create Shape" button
- Copy Code: Use the generated CSS code in your projects
- Multiple Selections: Continue clicking dots to extend your selection
- Shape Preview: View your shape in real-time in the preview panel
- Code Copying: One-click copy functionality for CSS and HTML code
- Click three dots to form a triangle
- Press Enter to create the shape
- Copy the generated CSS code:
.custom-shape {
width: 100%;
height: 100%;
min-height: 300px;
background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
clip-path: polygon(25.0% 25.0%, 75.0% 25.0%, 50.0% 75.0%);
border-radius: 8px;
}- Use the auto-connect feature to create straight edges
- Combine multiple line segments for complex polygons
- Create organic shapes by selecting individual dots
- HTML5: Semantic markup and structure
- CSS3: Modern styling with Tailwind CSS
- Vanilla JavaScript: No dependencies, pure JavaScript
- SVG: Vector graphics for connection lines
- ✅ Chrome 60+
- ✅ Firefox 55+
- ✅ Safari 12+
- ✅ Edge 79+
- Lightweight: Single HTML file under 50KB
- Fast Rendering: Optimized dot generation and selection
- Smooth Animations: Hardware-accelerated CSS transitions
The application is fully responsive and includes:
- Touch-friendly interface
- Optimized dot sizes for mobile
- Gesture support for shape creation
- Mobile-first responsive design
- Create unique clip-path shapes for web designs
- Generate custom SVG patterns
- Prototype geometric layouts
- Create masking shapes for images
- Generate CSS clip-path code quickly
- Create responsive shape designs
- Prototype UI components
- Generate SVG paths for animations
- Teach coordinate geometry concepts
- Demonstrate CSS clip-path properties
- Interactive math and design lessons
- Visual programming concepts
You can modify the grid size and spacing by changing these constants in the code:
const GRID_SIZE = 40; // Number of dots per row/column
const DOT_SPACING = 15; // Pixels between dotsThe application uses Tailwind CSS classes. You can customize:
- Color schemes
- Dot sizes and animations
- Panel layouts
- Button styles
We welcome contributions! Here's how you can help:
- Bug Reports: Found a bug? Open an issue with details
- Feature Requests: Have an idea? We'd love to hear it
- Code Contributions: Fork, improve, and submit a pull request
- Documentation: Help improve this README or add examples
- Clone or download the project
- Open
index.htmlin your browser - Make changes and test locally
- Submit your improvements
This project is open source and available under the MIT License.
- Bresenham's Algorithm: For smooth line drawing between dots
- Tailwind CSS: For beautiful, responsive styling
- Community: For feedback and feature suggestions
Need help or have questions?
- 📧 Email: Open an issue on GitHub
- 💬 Discussions: Use GitHub Discussions for questions
- 🐛 Bug Reports: Use GitHub Issues for bugs
- 💡 Feature Requests: Use GitHub Issues with enhancement label
- Bezier curve drawing
- Shape templates (circles, stars, hearts)
- Export to PNG/SVG files
- Undo/Redo for individual selections
- Grid snapping options
- Color picker for shapes
- Animation code generation
- Collaborative editing
- Shape library and sharing
- Advanced geometric tools
- Integration with design tools
Made with ❤️ for the design and development community
Happy shape creating! 🎨
This comprehensive README.md file covers all aspects of the Dot Grid Dev project, including features, usage instructions, technical details, and future roadmap. It's structured to be helpful for both users and potential contributors.