Shadcn.io is not affiliated with official shadcn/ui
React useDocumentTitle Hook
React useDocumentTitle hook to update browser tab title dynamically. SSR safe, TypeScript ready, works with Next.js App Router.
Set your browser tab title dynamically in React with one line. useDocumentTitle updates document.title reactively whenever your string changes. Show unread message counts, current page names, form states, or real-time data right in the browser tab. Zero dependencies, zero config—just pass a string. SSR safe with useEffect—no hydration issues. Works alongside Next.js metadata API for SEO. Perfect for dashboards, chat apps, notifications, or any dynamic UI.
React useDocumentTitle Hook preview
Installation
Related Components
React useEventListener Hook
Attach any event listener safely
React useIsClient Hook
Check if running on client
React useLocalStorage Hook
Persist state to localStorage
React useInterval Hook
Declarative setInterval management
React useCounter Hook
Counter with increment/decrement
React useBoolean Hook
Boolean state with toggle helpers
FAQ
Was this page helpful?
Sign in to leave feedback.