Skip to content

Viewport Detective ๐Ÿ•ต๏ธโ€โ™‚๏ธ -- Realtime viewport insights for frontend developers & designers ๐ŸŽจ๐Ÿ’ป Viewport Detective helps you quickly analyze and debug viewport sizes, breakpoints, and UI responsiveness. Whether youโ€™re a beginner learning frontend or a seasoned developer fine-tuning layouts, this tool makes building beautiful, pixel-perfect.

Notifications You must be signed in to change notification settings

RootDeveloperDS/ViewPort_Detective

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ•ต๏ธโ€โ™‚๏ธ Viewport Detective

A minimalistic, modern viewport inspector that helps developers debug responsive designs with precision.

[ ] [ ]

๐Ÿš€ Live Demo - ๐Ÿ“– Documentation - ๐Ÿ› Report Bug - โœจ Request Feature


๐ŸŽฏ What is Viewport Detective?

Viewport Detective is a real-time browser viewport inspector built for developers who want to perfect their responsive designs. No more guessing viewport dimensions or wrestling with browser dev toolsโ€”get instant, accurate viewport information with a clean, distraction-free interface.

๐ŸŒŸ Why Choose Viewport Detective?

  • ๐Ÿ” Real-time Detection: Watch viewport dimensions update instantly as you resize
  • ๐Ÿ“ฑ Device-Aware: Shows device pixel ratio, orientation, and safe area insets
  • ๐ŸŽจ Breakpoint Visualization: See which CSS breakpoint you're currently in
  • ๐Ÿ“‹ One-Click Copy: Copy all viewport details to clipboard instantly
  • ๐ŸŒ“ Theme Adaptive: Beautiful light and dark modes
  • โšก Lightning Fast: Built with Next.js 14 and optimized for performance

โœจ Features

๐Ÿ”ฎ Core Functionality

  • ๐Ÿ“ Live Viewport Dimensions: Real-time width ร— height display with smooth animations
  • ๐Ÿ–ฅ๏ธ Device Pixel Ratio: Critical for high-DPI display optimization
  • ๐Ÿ“ฑ Orientation Detection: Portrait/Landscape status for mobile-first design
  • ๐Ÿ”’ Safe Area Insets: Essential for notched and modern mobile devices
  • ๐Ÿ“ CSS Breakpoints: Visual indicator for xs/sm/md/lg/xl breakpoints
  • ๐Ÿ“‹ Copy to Clipboard: One-click copy of complete viewport information

๐ŸŽจ User Experience

  • ๐ŸŒ“ Dark/Light Themes: Instantly toggle between beautiful themes
  • โœจ Smooth Animations: Fluid transitions that don't distract from work
  • ๐Ÿ“ฑ Fully Responsive: Works perfectly on mobile, tablet, and desktop
  • โšก Performance Optimized: Minimal bundle size, maximum performance
  • โ™ฟ Accessible: Built with accessibility best practices

๐Ÿ› ๏ธ Developer Features

  • ๐Ÿ”ง TypeScript: Full type safety and IntelliSense support
  • ๐ŸŽฏ Modern Stack: Next.js 14, React 18, Tailwind CSS 3
  • ๐Ÿ“ฆ Zero Dependencies: Minimal external dependencies for reliability
  • ๐Ÿ”„ Hot Reload: Instant development feedback
  • ๐Ÿ“ฑ PWA Ready: Can be installed as a Progressive Web App

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18.0 or higher
  • npm, yarn, or pnpm

Installation

# Clone the repository
git clone https://github.com/RootDeveloperDS/ViewPort_Detective.git

# Navigate to project directory
cd ViewPort_Detective

# Install dependencies
npm install

# Start development server
npm run dev

Open http://localhost:3000 and start detecting! ๐Ÿ•ต๏ธโ€โ™‚๏ธ

Production Build

# Build for production
npm run build

# Start production server
npm start

๐Ÿ› ๏ธ Tech Stack

Technology Version Purpose
Next.js 14.0+ React framework with App Router
TypeScript 5.0+ Type safety and developer experience
Tailwind CSS 3.3+ Utility-first CSS framework
Lucide React Latest Beautiful, customizable icons
React Hooks 18.2+ State management and side effects

๐Ÿ“ฑ Responsive Breakpoints

Viewport Detective uses standard CSS breakpoints:

xs: < 640px    /* Mobile portrait */
sm: 640px+     /* Mobile landscape */
md: 768px+     /* Tablets */
lg: 1024px+    /* Laptops */
xl: 1280px+    /* Desktops */

๐ŸŽจ Customization

Theme Colors

The app supports full theming through Tailwind CSS variables:

/* Light Theme */
--background: 255 255 255;
--foreground: 0 0 0;

/* Dark Theme */
--background: 17 24 39;
--foreground: 255 255 255;

Breakpoint Customization

Modify breakpoints in src/hooks/useViewport.ts:

const getBreakpoint = (width: number): string => {
  if (width < 640) return 'xs'
  if (width < 768) return 'sm'
  // Add your custom breakpoints here
  if (width < 1024) return 'md'
  if (width < 1280) return 'lg'
  return 'xl'
}

๐Ÿค Contributing

We love contributions! Here's how you can help make Viewport Detective even better:

๐Ÿ› Found a Bug?

  1. Check if the issue already exists in Issues
  2. Create a new issue with detailed reproduction steps
  3. Include your browser, OS, and viewport dimensions

๐Ÿ’ก Have an Idea?

  1. Open a Feature Request
  2. Describe your idea and why it would be useful
  3. We'll discuss implementation details together

๐Ÿ”ง Want to Code?

# Fork the repo and create your feature branch
git checkout -b feature/amazing-feature

# Make your changes and commit
git commit -m 'Add amazing feature'

# Push to your branch
git push origin feature/amazing-feature

# Open a Pull Request

๐Ÿ“Š Browser Support

Browser Supported Versions
Chrome 90+
Firefox 88+
Safari 14+
Edge 90+

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Next.js Team for the amazing React framework
  • Tailwind CSS for making styling enjoyable
  • Lucide for beautiful, consistent icons
  • Vercel for seamless deployment platform

๐Ÿ“ž Connect

Built with โค๏ธ by Devansh Sharma

[ [

Made for developers, by RootDeveloperDS (Devansh Sharma). ๐Ÿš€


If Viewport Detective helped you build better responsive designs, consider giving it a โญ!

About

Viewport Detective ๐Ÿ•ต๏ธโ€โ™‚๏ธ -- Realtime viewport insights for frontend developers & designers ๐ŸŽจ๐Ÿ’ป Viewport Detective helps you quickly analyze and debug viewport sizes, breakpoints, and UI responsiveness. Whether youโ€™re a beginner learning frontend or a seasoned developer fine-tuning layouts, this tool makes building beautiful, pixel-perfect.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •