RI
rimildeyjsr/page-nav
Page Navigation Component - Fillout Take-Home Assignment
๐ Demo URL
https://page-nav-ten.vercel.app/
๐ Getting Started
To run this project locally, follow these steps:
- Clone the repository:
git clone git@github.com:rimildeyjsr/page-nav.git
cd page-nav
- Install dependencies:
npm install
- Run the development server:
npm run dev
- Open your browser:
Navigate to http://localhost:3000 to see the component in action.
๐ฏ Features
- Drag & Drop Reordering : Reorder pages by dragging and dropping
- Tab Navigation: Click to switch between pages
- Context Menu Actions (does not work as of now) : Rename, duplicate, delete
- Keyboard Navigation: Arrow keys, tab support
- Responsive Design: Works on mobile and desktop
- Arrow Left/Right - Navigate between pages (Lines 88-96)
- Enter - Activate focused page
- Cmd/Ctrl + Enter - Start editing page name
- Spacebar - Activate focused page
- F2 - Start editing page name
- Escape - Cancel editing/close menus/stop dragging
- Context Menu Key - Open context menu
- Shift + F10 - Open context menu
- Ctrl + Space - Open context menu
- Enter/Escape in Edit Mode - Save/cancel editing
- Dynamic Addition: Add pages with hover buttons or main add button
- Inline editing : Ability to edit page names
๐๏ธ Architectural Overview
High-Level Design
PageNavigationContainer (Smart Component)
โโโ State Management (useReducer + Actions)
โโโ Event Handling (Keyboard, Mouse, Drag & Drop)
โโโ Performance Layer (Memoization, Callbacks)
โโโ Presentation Layer
โโโ PageTab (Draggable, Editable)
โโโ Divider (Hover Add Buttons)
โโโ AddPageButton (Primary Action)
โโโ ContextMenu (Right-click Actions)
โโโ DragOverlay (Visual Feedback)
๐ ๏ธ Technology Stack
Core Technologies
React, TypeScript, Next.js 15, Tailwind CSS
Drag & Drop
Used the @dnd-kit library for drag-and-drop functionality, which provides a flexible and accessible API. Chose it over native HTML5 drag & drop because it provides accessibility-first design with full keyboard navigation support and React-optimized performance with proper state management integration.
Testing & Quality
Vitest with React testing library
On this page
Languages
TypeScript99.0%CSS0.5%JavaScript0.5%
Contributors
Created June 22, 2025
Updated June 24, 2025