Loading...
Please waitLoading...
Please waitDynamically update the document title. Pass a string, and the document title updates whenever the value changes.
pnpm dlx shadcn@latest add https://usekit.kiron.dev/k/use-document-title
"use client"
import { useDocumentTitle } from "@/hooks/use-document-title"
export function Component() {
useDocumentTitle("New title for my page")
return <div>...</div>
}
Name | Type | Description | Default Value | Optional |
---|---|---|---|---|
title | string | The new title to set for the document. | "" | No |
Click to increment the counter and watch the document title update in real-time!