clipboard-inspector
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
index.ts
https://stevekrouse--d06b67ae60e711f088a60224a6c84d84.web.val.run
A React-based single-page application that helps debug and inspect clipboard contents in detail.
βββ backend/
β βββ index.ts # Hono server for serving files
βββ frontend/
β βββ components/
β β βββ App.tsx # Main application component
β β βββ ClipboardReader.tsx # Read/Clear buttons
β β βββ ClipboardResults.tsx # Results container
β β βββ ClipboardItemDisplay.tsx # Individual item display
β β βββ ClipboardDataDisplay.tsx # Data type router
β β βββ TextDataDisplay.tsx # Text content display
β β βββ ImageDataDisplay.tsx # Image preview
β β βββ BinaryDataDisplay.tsx # Binary hex dump
β β βββ ErrorMessage.tsx # Error display
β β βββ PermissionWarning.tsx # Permission warning
β βββ types/
β β βββ clipboard.ts # TypeScript interfaces
β βββ index.html # Main HTML template
β βββ index.tsx # React entry point
βββ README.md
- Multi-format Support: Reads all available MIME types from clipboard items
- Text Analysis: Shows character count, line count, and full content for text data
- Image Preview: Displays images directly in the browser with format information
- Binary Data: Shows hex dump of binary data (first 256 bytes)
- Permission Handling: Clear feedback about clipboard permissions
- Error Handling: Comprehensive error messages and troubleshooting
- React Architecture: Modular component structure with TypeScript
- Copy something to your clipboard (text, image, or other data)
- Click "π Read Clipboard" button
- Grant permission when prompted by your browser
- View detailed information about your clipboard contents
- Frontend: React 18.2.0 with TypeScript
- Backend: Hono server for static file serving
- Styling: Tailwind CSS via CDN
- API: Modern Clipboard API (
navigator.clipboard.read()) - Security: Requires HTTPS or localhost
- Architecture: Component-based with proper separation of concerns
- Chrome/Edge: Full support
- Firefox: Limited support (text only in most versions)
- Safari: Requires user gesture and may have limitations
- Requires explicit user permission to access clipboard
- Only works on HTTPS sites (or localhost for development)
- No data is sent to any server - everything runs client-side
