Skip to main content
The ProjectCards block renders a grid of project cards from the Sanity project document type. Projects are fetched once per build by getAllProjects() and filtered by resolveBlockProjects() before the block receives them.

Props

heading
string
Optional section heading rendered as <h2>.
displayMode
'all' | 'featured' | 'manual'
Controls which projects are shown. Defaults to all.
ValueBehavior
allAll projects (ordered by title)
featuredOnly projects where featured == true
manualEditor-selected list via multi-reference picker
projects
Project[]
Pre-resolved array of project objects injected by BlockRenderer via resolveBlockProjects(). Each project includes _id, title, slug, content, sponsor, technologyTags, semester, status, outcome, and featured.

Usage in Sanity Studio

  1. Add a Project Cards block to a page.
  2. Set an optional Heading.
  3. Choose a Display Mode: all, featured, or manual.
  4. If manual, use the multi-reference picker to select specific projects.
Mark important projects featured: true in the Project document to create curated highlight sections without duplicating block config.

Example

{
  _type: 'projectCards',
  heading: 'Featured Projects',
  displayMode: 'featured'
}

Build docs developers (and LLMs) love