
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI need to be honest - I couldn't find specific documentation about the direct replacement for SanityPreview from @sanity/base/preview in Studio v3. This is a common pain point during migration since the component was widely used in v2.
What I can confirm is that Studio v3 deprecated the entire Parts System, which means all @sanity/base/* imports no longer exist. Everything moved to the main sanity package with JavaScript-based configuration.
Here's what I'd recommend:
For rendering previews in custom tools/plugins in v3, you have a few approaches:
Use Sanity UI components directly - Build your preview UI using @sanity/ui components and fetch the data you need through hooks or the client
Check the sanity package exports - There may be a preview component exported from the main package, but I cannot verify the exact API without access to the current type definitions
Use preview functionality from Structure Builder - If you're building custom views, the Component View system might provide what you need
My strong recommendation: Post this question in the Sanity Community Slack or check the official v2 to v3 migration guide. The Sanity team is very responsive to migration questions and can point you to the exact replacement component and its API.
Since you're porting a custom tool, the team can also advise on whether the v3 plugin architecture has better patterns for what you're trying to accomplish. The v3 plugin API is significantly different, so there might be a more idiomatic approach than directly replacing the component.
Sorry I couldn't provide the exact code replacement - I'd rather point you to verified sources than give you something that might not work!
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