Details
- You are creating a tiling window system similar to Windows or Mac.
- Users will be able to create windows using the “+” button on the bottom right corner.
- Each window will be created in a random color, and show up at a random position
- Windows will have a bar on the top with a close button
- Users can close windows using the close button
- Users can click and drag on the bar to move windows.
- When a window is within 30px of an edge of the screen, there will be a transparent indicator showing that the window can be snapped to that side
- Once a window is snapped it will either take the full width (if snapped to top or bottom), or the full height (is snapped to right or left)
- Window will always take up 50% of the space on the axis it was snapped.
- Windows can be further snapped inside another window grid; i.e. once you snap a window to the left, you can snap another window to the left window’s top.
- Initially windows can be snapped on all 4 sides: top, left, bottom, right
- After the window has already been divided, snapping will only occur on the longer axis of a sub-grid.
- Windows can still be closed after being snapped; this will cause the other side to take the entire space.
- Windows can be moved out of their snapping positions causing it to be floating window again; the other window in the grid cell will take up the full space (similar to the closing case)
(Common) Rules
- Don’t make change to the
package.json
file provided int he starter code.
- Don’t use an extra libraries from npm.
- Don’t use SVG or Canvas; prefer to keep it only React to render HTML and CSS/Tailwind
Evaluate Yourself
- [ ] (1/6) Windows are being generated at random positions
- [ ] (2/6) You are able to move the windows
- [ ] (3/6) Windows are snapping to the sides