
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI can see exactly what you're running into! The short answer is: the title from string list options is not stored in your documents – only the value is saved. This means you can't directly access the title in previews or on the front-end without mapping it yourself.
Looking at your projectMember example, when you save roles like ['content', 'director'], that's literally what gets stored in the database. The titles ("Content Designer", "Director") are just UI labels for the Studio interface.
You can create a mapping object to convert values back to titles:
preview: {
select: {
personName: 'person.name',
roles: 'roles',
media: 'person.image'
},
prepare(data) {
const roleMap = {
content: 'Content Designer',
director: 'Director',
engineer: 'Engineer',
engineeringManager: 'Engineering Manager',
designer: 'Product Designer',
manager: 'Product Manager',
sme: 'Subject Matter Expert',
technicalWriter: 'Technical Writer',
researcher: 'UX Researcher'
}
return {
...data,
title: data.personName,
subtitle: data.roles && data.roles.map(role => roleMap[role]).join(' / ')
}
}
}In your Gatsby (or any front-end) code, you'll need the same mapping logic:
const roleMap = {
content: 'Content Designer',
director: 'Director',
// ... etc
}
const displayRoles = roles.map(role => roleMap[role])If you don't need the short values for anything specific (like CSS classes or API keys), you could just use human-readable strings as both the title AND value:
options: {
layout: 'radio',
list: [
{title: 'Content Designer', value: 'Content Designer'},
{title: 'Director', value: 'Director'},
// or even simpler:
'Content Designer',
'Director',
'Engineer'
]
}This way, the readable text gets stored directly and you don't need mapping logic anywhere.
As mentioned in the preview configuration documentation, title values in list options are UI-only and not stored in the database. This is by design – it keeps your data layer clean and allows you to change UI labels without migrating data.
The trade-off is that you need to maintain the mapping in your code, but this gives you flexibility to display different labels in different contexts (Studio vs. front-end, different languages, etc.).
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