You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have website interface elements in other corners, so the bottom-right is okay location.
Preferably, it would be handy to set some default position e.g. "bottom center", or "bottom-right" with offset 100px top.
Currently, I'm hacking the default toolbar creating a client-only component to implement this offset, so the reactscan is a little bit above next.js dev toolbar icon.
I like this. Would love to see the offset as configuration to the scan({...}) options, and maybe we increase the default concept to handle next.js always
Added a new safeArea option that accepts either a single number (insets all edges) or a per-edge object:
scan({// single value, applies to all four edgessafeArea: 96,// or per-edge — set just what you needsafeArea: {right: 96,bottom: 96},})
Default is still 24 so existing setups are unchanged. The constant was refactored out of widget positioning math (calculatePosition, calculateNewSizeAndPosition, WindowDimensions, collapsed-corner positioning, max-size CSS) into a getSafeArea() helper that resolves per-edge from options at runtime.
Bugbot also flagged a pre-existing RTL bug surfaced by asymmetric values — the right-anchor positioning math was applying the wrong edge to the wrong physical side; that's also fixed in this release.
Thanks for the detailed repro and the vibe-coded reference implementation 👍
Activity
paulrogov commentedon Mar 31, 2026
Expanded:

Minimzed:

I've vibe-coded "the monster", but it works adding offset to the shadow root styles:
Next.js
layout.tsx:Component
ReactScan.tsx:RobPruzan commentedon Apr 2, 2026
I like this. Would love to see the offset as configuration to the scan({...}) options, and maybe we increase the default concept to handle next.js always
aidenybai commentedon May 2, 2026
Fixed in v0.5.5 via #437.
Added a new
safeAreaoption that accepts either a single number (insets all edges) or a per-edge object:Default is still
24so existing setups are unchanged. The constant was refactored out of widget positioning math (calculatePosition,calculateNewSizeAndPosition,WindowDimensions, collapsed-corner positioning, max-size CSS) into agetSafeArea()helper that resolves per-edge from options at runtime.Bugbot also flagged a pre-existing RTL bug surfaced by asymmetric values — the right-anchor positioning math was applying the wrong edge to the wrong physical side; that's also fixed in this release.
Thanks for the detailed repro and the vibe-coded reference implementation 👍