
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeFlickering in iframe previews with Next.js App Router is a common issue, and you're not alone in experiencing this! The flickering typically happens because the iframe is doing full page reloads instead of smooth content updates when you edit in Studio.
Why This Happens
The iframe pane plugin wasn't specifically designed for the modern App Router architecture, which can cause the preview to refresh the entire page when content changes rather than hot-reloading just the updated content. This creates the flickering effect you're seeing.
The Modern Solution: Use the Presentation Tool
Instead of the iframe pane plugin, I'd strongly recommend switching to the Presentation Tool with Visual Editing. This is Sanity's officially supported, modern approach for live previews and it's specifically built to work seamlessly with Next.js App Router.
The Presentation Tool gives you:
Getting Started
npm install sanity@latestFollow the Visual Editing with Next.js App Router guide to set it up
Configure the Presentation Tool in your sanity.config.ts:
import { presentationTool } from 'sanity/presentation'
export default defineConfig({
plugins: [
presentationTool({
previewUrl: {
previewMode: {
enable: '/api/draft-mode/enable',
},
},
}),
],
})The Presentation Tool appears in your Studio toolbar and embeds your app's preview directly in the interface. It handles all the complexity of live updates and draft content properly, eliminating the flickering issues you're experiencing with the iframe plugin.
If you want to learn more, there's also a full Visual Editing with Next.js course that walks through the entire setup.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store