claude-code - 💡(How to fix) Fix Feature request: device size presets / responsive preview in the Preview window [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46269Fetched 2026-04-11 06:24:46
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

The Preview window currently shows the app at a fixed size. It would be very useful to be able to quickly switch between common device size presets (mobile, tablet, desktop) or set a custom viewport, similar to browser DevTools' responsive mode.

Root Cause

The Preview window currently shows the app at a fixed size. It would be very useful to be able to quickly switch between common device size presets (mobile, tablet, desktop) or set a custom viewport, similar to browser DevTools' responsive mode.

RAW_BUFFERClick to expand / collapse

Summary

The Preview window currently shows the app at a fixed size. It would be very useful to be able to quickly switch between common device size presets (mobile, tablet, desktop) or set a custom viewport, similar to browser DevTools' responsive mode.

Requested features

  • Device preset buttons (e.g. Mobile 375px, Tablet 768px, Desktop 1280px, Full width)
  • Custom width/height input
  • Orientation toggle (portrait / landscape)
  • Optional: display current dimensions

Expected behavior

The Preview window has a toolbar or resize controls that let the user switch viewport sizes without manually resizing the window. Claude can also use these when verifying responsive layouts.

Current behavior

The preview renders at whatever size the preview panel happens to be. There is no way to quickly test a specific viewport size.

Use case

Responsive design work — verifying that layouts look correct at mobile, tablet, and desktop breakpoints without leaving the IDE.

extent analysis

TL;DR

Implementing device preset buttons and custom width/height input in the Preview window toolbar will allow users to quickly switch between common device sizes.

Guidance

  • Add a toolbar to the Preview window with buttons for common device presets (e.g., Mobile, Tablet, Desktop) to enable quick switching between viewport sizes.
  • Include a custom width/height input field in the toolbar to allow users to set specific viewport dimensions.
  • Consider adding an orientation toggle (portrait/landscape) to further enhance the responsive design testing capabilities.
  • Displaying the current dimensions in the toolbar can provide additional context for users.

Example

No specific code example can be provided without knowing the implementation details, but the solution will likely involve adding HTML elements for the toolbar and buttons, and JavaScript code to handle the button clicks and update the viewport size accordingly.

Notes

The implementation details may vary depending on the specific technologies and frameworks used in the project. This guidance assumes a web-based IDE with a Preview window that can be modified to include a toolbar and responsive design controls.

Recommendation

Apply a workaround by adding a basic toolbar with device preset buttons and a custom width/height input field to the Preview window, as this will provide the most immediate benefit for users working on responsive designs.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The Preview window has a toolbar or resize controls that let the user switch viewport sizes without manually resizing the window. Claude can also use these when verifying responsive layouts.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING