Shaking your head at your <head>?

Unhead is the any-framework document head manager with a focus on delightful DX and performance.

useHead
// all the goodies
useHead({
  // Titles
  title: 'Hello World',
  titleTemplate: '%s %separator %siteName',
  // Template params
  templateParams: { separator: '|', siteName: 'My App' },
  // Classes
  bodyAttrs: { class: { overflow: true } },
  // Deduping
  script: [{ key: '123', src: 'https://example.com/script.js' }],
})

Features

Feature Packed

With deduping, sorting, title templates, template params and dom events out of the box.

Rock-solid DOM Updates

Custom side-effect based algorithm to play nicely with your existing tags.

Pluggable Core

Hook into any part of the head rendering process using Hookable.

Plugins for Extra Oomph

Boost your performance with Capo.js ordering, Vite tree-shaking and hash hydration.

Totally Typed

Full TypeScript head schema with MDN documentation.

Ecosystem Battled Tested

Adopted by the Vue ecosystem with hundreds of bugs squished.

Sponsors

This package is most possible by these amazing sponsors.