
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeBased on the discussion you linked and the recent Sanity Studio v3 changes, here's what you need to know about implementing routing in Sanity plugins:
@sanity/state-router and the Router APIYes, the Router API (which includes @sanity/state-router concepts) is the recommended way to handle routing in Sanity Studio plugins. As of Studio v3.81.0 (March 2025), there have been significant improvements to the Router API.
The best reference is the plugin-template-tool-with-routing template mentioned in the community discussion. This shows how to:
StateLink - for navigating with paramsIntentLink - for subpages/intentsLink - for basic navigation back to your plugin's base routeThe Router API now has better support for stickyParams via the useRouter hook:
const router = useRouter()
// Navigate with sticky params
router.navigate({
stickyParams: {paramKey: 'paramValue'},
replace: false
})
// Or combine with state updates
router.navigate({
stickyParams: {paramKey: 'paramValue'},
state: {
stateKey: 'stateValue'
}
})Note: navigateStickyParams from sanity/router is now deprecated - use the navigate method with options instead.
To create a custom page at a route like /mycustompage (similar to /desk), you need to:
sanity.config.tsThe community member in your linked discussion confirmed this is possible - you create a plugin tool that renders custom UI and handles its own routing internally.
Unfortunately, as noted in the discussion, documentation is limited. Your best bet is to:
The Router API is actively being improved, so keep an eye on Studio changelogs for new routing features!
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