
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThe issue you're experiencing is that you're using type: "array" when you should be using type: "string" for radio buttons with a predefined list.
According to the Sanity string type documentation, when you want radio buttons for a predefined list of options, you need to use the string type, not the array type. Here's the corrected schema:
{
title: "Num Cols",
name: "cols",
type: "string", // Change from "array" to "string"
options: {
list: [
{ title: "One Column", value: "1" },
{ title: "Two Columns", value: "2" },
{ title: "Three Col", value: "3" }
],
layout: "radio",
direction: "horizontal"
}
}Key differences:
type: "string" instead of type: "array"of property: The of property is only for array typesThe layout: "radio" option only works with string types that have a predefined list. When you use type: "array", Sanity treats it as a multi-select field and renders it as checkboxes, which is why you were seeing that behavior.
If you actually need multiple selections (an array of strings), then checkboxes are the correct UI. Arrays with predefined lists support layout: "tags" or layout: "grid" options, but not layout: "radio" since radio buttons are inherently single-selection controls.
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