Sets the browser's document title, automatically including the app's name from the manifest.
This follows the same convention as Sanity Studio workspaces, where the workspace name is always present in the title:
<viewTitle> | <appTitle>
<appTitle>
The Sanity dashboard appends | Sanity to produce the final browser tab title.
| Sanity
Optional
An optional view-specific title to prepend to the app title.
import {useWindowTitle} from '@sanity/sdk-react'function MoviesList() { useWindowTitle('Movies') return <div>...</div>}// Browser tab: "Movies | My App | Sanity" Copy
import {useWindowTitle} from '@sanity/sdk-react'function MoviesList() { useWindowTitle('Movies') return <div>...</div>}// Browser tab: "Movies | My App | Sanity"
// Call without arguments to show just the app titlefunction AppRoot() { useWindowTitle() return <Outlet />}// Browser tab: "My App | Sanity" Copy
// Call without arguments to show just the app titlefunction AppRoot() { useWindowTitle() return <Outlet />}// Browser tab: "My App | Sanity"
Sets the browser's document title, automatically including the app's name from the manifest.
This follows the same convention as Sanity Studio workspaces, where the workspace name is always present in the title:
<viewTitle> | <appTitle><appTitle>The Sanity dashboard appends
| Sanityto produce the final browser tab title.