What Hoofd does
Hoofd provides React hooks that write into the document head from inside components. useTitle sets document.title, useTitleTemplate formats it with a pattern, useMeta and useLink add meta and link tags, and useLang sets the html lang attribute. A dispatcher keeps a queue of fallback values so a crawler that does not run client side scripts still receives head content.
useScript injects script tags and a toStatic method returns the collected head tags for server side rendering. An alternative useHead hook accepts one object holding title, language, metas and links. React is the default entry point, hoofd/preact serves Preact, and a Gatsby plugin fills the head during the build. MIT licensed, installed with npm i --save hoofd or yarn add hoofd.
Key features
- useTitle hook
- Accepts a string, sets document.title, and updates the property each time the string changes.
- useTitleTemplate formatting
- Accepts a pattern string used to form the document title around the value passed to useTitle.
- useMeta tag hook
- Takes regular meta properties such as name and content and adds the tag to the document head.
- useLink tag hook
- Takes link properties rel and href, then adds the corresponding link element to the head.
- useLang html attribute
- Accepts a string and sets the lang attribute on the html element.
- useScript injection
- Takes a few arguments and leads to an injection of a script tag into the document.
- toStatic for SSR
- Returns the head tags collected during a render so a server can place them in the response.
- Fallback dispatcher queue
- Keeps a queue of fallback values so crawlers that skip client side scripts still receive head information.
- Single object useHead
- One hook takes title, language, metas and links in a single object instead of separate calls.
- Preact entry point
- Importing from hoofd/preact gives the same hooks with Preact support instead of React.
- Gatsby build plugin
- A separate gatsby-plugin-hoofd package fills meta and other head tags during the build process.
- Context API export
- A Context API sits alongside the default statically initialized dispatcher used by the package.
How it works
- Install the package with npm i --save hoofd or yarn add hoofd.
- Import the hooks from hoofd, or from hoofd/preact when the app uses Preact.
- Call useTitle, useTitleTemplate, useMeta, useLink and useLang inside components to describe the head.
- Alternatively call useHead once with title, language, metas and links in a single object.
- For server rendering, call toStatic to get the collected head tags as output.
- For Gatsby sites, add gatsby-plugin-hoofd so the head is filled during the build.
Plans and pricing
The package is published as MIT licensed open source with no price printed in the material.
Integrations and platforms
Works with
- React
- Preact
- Gatsby
Available as
- Web
Repository facts
- Repository0no-co/hoofd
- LanguageTypeScript
- Stars341
- Forks17
- LicenceMIT
- Created2020-04-02
- Last commit2026-05-19
- Open issues10
- head
- html
- react
- react-hooks
- seo
Services and details
Does SEO work itself
YesFree plan or free tools
YesAPI or MCP server
Yes
No information yet on keyword research, content optimization, writes content with AI, technical audits, rank tracking, backlinks and link building, local SEO, AI search visibility, free trial, WordPress plugin, browser extension, built for agencies. The website did not say; check with the vendor.
About the company
- Company 0no-co
- Website: github.com/0no-co/hoofd
Listing compiled from public sources and the product's own website. Last updated 2026-11-12. Report a correction or request removal. Back to GitHub repos.