A Figma-inspired visual design editor built entirely using HTML, CSS, and Vanilla JavaScript, without relying on Canvas, SVG engines, or external frameworks. This project focuses on core frontend engineering fundamentals: DOM manipulation, event handling, coordinate math, and state management.
π Live Demo (Vercel): https://figma-style-design.vercel.app/
This project was developed as part of a Sheryians Coding School frontend challenge. The objective was not to replicate Figmaβs performance or complexity, but to demonstrate a strong grasp of:
- DOM-based rendering
- Interaction design
- Editor-style state handling
- Clean, modular JavaScript architecture
All features are implemented using standard DOM elements only.
-
Rectangle
-
Circle
-
Text
-
Each element:
- Is a
<div>in the DOM - Has a unique ID
- Has default size and position
- Stores metadata for future operations
- Is a
- Only one element can be selected at a time
- Visual selection indicator (outline)
- Resize handles appear on selection
- Clicking on empty canvas deselects the element
- Centralized selection state shared across tools
-
Dragging
- Mouse-based drag
- Boundary-restricted (cannot leave canvas)
-
Resizing
- Corner-only resize handles
- Live width/height updates
- Minimum size constraints
-
Rotation
- CSS
transform: rotate() - Rotation state preserved during save/load
- CSS
- Lists all elements on the canvas
- Click a layer β selects the element
- Move Up / Move Down controls
- Layer order synced with
z-index
Editable properties (context-aware):
- Width
- Height
- Background color
- Text content (for text elements only)
Changes reflect in real time on the selected element.
Deleteβ removes selected element- Arrow keys β move element by 5px
- Boundary-aware keyboard movement
- Active only when an element is selected
-
Uses
localStorage -
Canvas state saved as an array of objects
-
On page refresh:
- Elements are reconstructed
- Position, size, style, rotation, and layer order preserved
-
JSON Export
- Downloads internal layout data
-
HTML Export
- Generates basic HTML with inline styles
- Visually reproduces the canvas design
The application is responsive and tested across:
- β Desktop (Laptop)
- β Tablet
- β Mobile
Both:
- Landing Page (
index.html) - Editor Canvas (
canvas.html)
are fully responsive.
- HTML5
- CSS3
- Vanilla JavaScript (ES6+)
- No Canvas API
- No SVG
- No external libraries or frameworks
This project intentionally prioritizes:
- Clarity over abstraction
- Readable, modular JavaScript
- Explicit state handling
- Correctness over shortcuts
Advanced rendering optimizations were deliberately avoided to stay aligned with the challenge intent.
- Multi-select support
- Snap-to-grid
- Undo / Redo history
- Grouping elements
- Zoom & pan canvas
This project is for educational and demonstration purposes.
If you want next:
- GitHub project description
- Resume bullet points
- Interview explanation (how to defend architecture choices)
say the word.