Overview
The feedback widget includes an optional screenshot annotation feature that allows users to capture a screenshot of your page, annotate it with arrows, rectangles, text, and freehand drawings, and submit it along with their feedback. This is invaluable for bug reports and visual feedback.Quick Start
Enable screenshots by adding thedata-enable-screenshots attribute:
your-project-key with your project’s unique key from the dashboard.
How It Works
When screenshots are enabled, the feedback modal displays an “Add Screenshot” button:- User opens the feedback modal
- User clicks “Add Screenshot”
- The visible viewport is captured automatically
- An annotation modal opens with drawing tools
- User annotates the screenshot
- Screenshot is attached to the feedback form
- User adds their feedback message and submits
Features
- Viewport Capture - Captures exactly what the user sees using SnapDOM
- Arrow Tool - Draw arrows to point at specific elements
- Rectangle Tool - Highlight areas with rectangles
- Pen Tool - Freehand drawing for detailed annotations
- Text Tool - Add text labels anywhere on the screenshot
- Undo/Redo - Full history support with keyboard shortcuts
- Color Picker - Choose annotation color
- JPEG Compression - Optimized file sizes for fast uploads
- Mobile Support - Touch-enabled for mobile devices
Configuration Options
Screenshot-Specific Attributes
Enable the screenshot capture and annotation feature
Maximum file size in megabytes for the compressed screenshot
JPEG compression quality (0.0 to 1.0). Lower values = smaller files
Examples
Basic Screenshot Support
Custom Settings
Higher Compression for Mobile
JavaScript API
Control screenshots programmatically:Programmatic Capture
Trigger screenshot capture from your own UI:Keyboard Shortcuts
The annotation modal supports these keyboard shortcuts:| Shortcut | Action |
|---|---|
Ctrl+Z / Cmd+Z | Undo last annotation |
Ctrl+Shift+Z / Cmd+Shift+Z | Redo annotation |
Ctrl+Y / Cmd+Y | Redo annotation (alternative) |
Escape | Close the annotation modal |
Annotation Tools
Arrow Tool
Draw arrows to point at specific elements. Click and drag from the starting point to the arrowhead location.Rectangle Tool
Draw rectangles to highlight areas. Click and drag to define the rectangle bounds.Pen Tool
Freehand drawing for detailed annotations. Click and drag to draw paths.Text Tool
Click anywhere to add text labels. Press Enter to confirm or Escape to cancel.Color Picker
Change the annotation color using the color picker in the toolbar. Default color is red (#FF0000).Storage Requirements
Supported storage providers:- AWS S3
- DigitalOcean Spaces
- Cloudflare R2
- MinIO (self-hosted)
- Any S3-compatible service
Technical Details
Page Capture
The widget uses SnapDOM to capture the visible viewport. SnapDOM is a modern DOM capture engine that:- Supports all modern CSS including oklch, oklab, lab, lch, color-mix, and CSS custom properties
- Uses native browser APIs for accurate rendering without CSS parsing limitations
- Is significantly faster than legacy solutions like html2canvas
- Cross-origin images must have CORS headers or they may appear blank
- iframes from different origins cannot be captured
- Video content captures the current frame only
- Only visible viewport is captured (not the full page)
File Sizes
Screenshots are compressed to JPEG format. Typical file sizes:| Page Size | Quality 0.8 | Quality 0.6 |
|---|---|---|
| Simple page | ~200-400 KB | ~100-250 KB |
| Complex page | ~400-800 KB | ~200-500 KB |
| High-DPI display | ~800 KB-1.5 MB | ~400-800 KB |
Dependencies
When screenshots are enabled, the widget automatically loads:SnapDOMlibrary from unpkg CDN (first capture only, ~15KB gzipped)screenshot.cssstyles for the annotation modal
Browser Compatibility
The screenshot feature works in all modern browsers:- Chrome 60+
- Firefox 55+
- Safari 11+
- Edge 79+
On mobile devices, the widget adapts with larger touch targets and a responsive toolbar layout.
Troubleshooting
Screenshot is blank or missing content
- Check for cross-origin images without CORS headers
- Iframes from different domains cannot be captured
- Some CSS properties may not render correctly
Upload fails
- Verify S3 storage is configured correctly
- Check that the file size is within limits
- Ensure your API endpoint is accessible
”Add Screenshot” button doesn’t appear
- Verify
data-enable-screenshots="true"is set - Check browser console for JavaScript errors
- Ensure S3 storage is configured (recommended but not required for button to appear)
captureScreenshot() warns about screenshots not enabled
- Add
data-enable-screenshots="true"to your script tag - Check
SeggwatFeedback.screenshotsEnabledto verify the feature is enabled