How to change "Publish" button text to "Save" in Sanity?

6 replies
Last updated: Nov 29, 2025
Change the "Publish" button text to "Save"??Any quick tips on how to?
AI Update

You can customize the "Publish" button text by overriding the default PublishAction in your Studio configuration. Here's how to do it:

First, create a custom document actions resolver. In your Studio config folder, create a file (e.g., customDocumentActions.ts or customDocumentActions.js):

import {PublishAction} from 'sanity'

// Custom publish action with different label
const CustomPublishAction = (props) => {
  const defaultPublishAction = PublishAction(props)
  
  return {
    ...defaultPublishAction,
    label: 'Save' // Change the button text here
  }
}

export default function resolveDocumentActions(props) {
  // Replace the default PublishAction with your custom one
  return [CustomPublishAction]
}

Then, add this resolver to your sanity.config.ts:

import {defineConfig} from 'sanity'
import {structureTool} from 'sanity/structure'
import resolveDocumentActions from './customDocumentActions'

export default defineConfig({
  // ... other config
  document: {
    actions: resolveDocumentActions
  }
})

If you want to keep all the other default actions (like Unpublish, Delete, etc.) alongside your custom "Save" button, modify the resolver like this:

import {PublishAction} from 'sanity'
import defaultResolve from 'sanity'

const CustomPublishAction = (props) => {
  const defaultPublishAction = PublishAction(props)
  return {
    ...defaultPublishAction,
    label: 'Save'
  }
}

export default function resolveDocumentActions(props) {
  return defaultResolve(props).map((Action) =>
    Action === PublishAction ? CustomPublishAction : Action
  )
}

This approach lets you customize document actions while maintaining all the built-in functionality of the publish action—just with different button text!

Show original thread
6 replies

Sanity – Build the way you think, not the way your CMS thinks

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.

Was this answer helpful?