Stop Rebuilding UI

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

Scroll to load preview

Installation

FAQ

Was this page helpful?

Sign in to leave feedback.