
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeUnfortunately, there's no built-in schema option to directly customize the "Add item" button text in array fields. The standard array field configuration doesn't provide properties like buttonTitle or similar for changing this text through schema alone.
However, you can customize it by creating a custom input component. This is the recommended approach when you need to modify the array's add button or other UI elements.
You'll need to create a custom input component that wraps the default array input. The key is using the renderDefault function to preserve all the standard array functionality while customizing just the add button:
import { ArrayOfObjectsInputProps } from 'sanity'
import { Button, Stack } from '@sanity/ui'
import { AddIcon } from '@sanity/icons'
function CustomArrayInput(props: ArrayOfObjectsInputProps) {
const { renderDefault, onItemAppend, schemaType } = props
const handleAdd = () => {
const newItem = {
_type: schemaType.of[0].name,
_key: `${Date.now()}` // Generate unique key
}
onItemAppend(newItem)
}
return (
<Stack space={3}>
<Button
icon={AddIcon}
mode="ghost"
onClick={handleAdd}
text="Add new category" // Your custom text here
/>
{renderDefault(props)}
</Stack>
)
}Then apply it in your schema:
defineField({
name: 'categories',
title: 'Categories',
type: 'array',
of: [{ type: 'category' }],
components: {
input: CustomArrayInput
}
})You might see references to insertMenu.groups in array configuration - this is not for customizing the add button text. The insertMenu.groups feature is specifically for organizing different types into named groups when your array accepts multiple types in the of array. It helps categorize what types of items can be added, but doesn't change the button text itself.
For more detailed examples of customizing array inputs, check out the Form Components API documentation and guides on creating custom input components, which provide similar patterns for array customization.
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