
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeYes! There's a great way to display documents that reference a specific document in Sanity Studio. Sanity's Content Lake indexes references bi-directionally, which means you can query "incoming references" - documents that contain references to the current document.
The simplest approach is to use the Documents Pane plugin. This plugin lets you display GROQ query results directly in your Studio's view pane, which is perfect for showing which pages use a specific widget.
sanity install documents-paneIn your Structure Builder configuration (typically deskStructure.js), add this to your widget document views:
import DocumentsPane from 'sanity-plugin-documents-pane'
S.view
.component(DocumentsPane)
.options({
query: `*[!(_id in path("drafts.**")) && references($id)]`,
params: { id: `_id` },
useDraft: false
})
.title('Referenced By')This configuration:
query: Finds all documents (excluding drafts) that reference the current document's IDparams: Passes the current document's _id as a parameteruseDraft: Set to false to only show published documentsWhen editors open a widget in Studio, they'll see a "Referenced By" tab showing all the pages that use that widget. They can click through to those pages directly from the widget's edit view.
As explained in the Connected Content docs, references in Sanity are always bi-directional. When a page references a widget, the Content Lake automatically indexes this relationship in both directions. This means you can query:
If you need more control or want to display this information elsewhere, you can use the references() function in GROQ directly:
*[_type == "page" && references("widget-id-here")]The Documents Pane plugin is the easiest solution since it provides a ready-made UI component that integrates seamlessly into your Studio's document editing experience. It's exactly designed for this "show me what references this" use case!
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