unhead
Universal document <head> tag manager. Tiny, adaptable and full-featured.
Universal document <head> tag manager. Tiny, adaptable and full featured.
Highlights
- 🌳 Powerful pluggable core with a tiny footprint
- 🍣 All the good stuff: deduping, sorting, title templates, template params, etc.
- 🪨 Rock-solid DOM updates, fast and tiny (~1kB minzipped)
- 🚀 Add-ons for extra oomph: Capo.js, Tree-shaking,
useSeoMeta
,useScript
, etc. - 💎 Fully typed with MDN docs
- 🤝 Used by Nuxt with more framework support coming soon.
Docs
Visit the documentation site for guides and API references.
Install
npm i unhead
Quick Setup
Create the head client somewhere in your root application.
import { createHead } from 'unhead'
createHead()
Then use the composables anywhere you want.
// pages/about.js
import { useHead } from 'unhead'
useHead({
title: 'About',
meta: [
{ name: 'description', content: 'Learn more about us.' },
],
})
Demos
License
MIT License © 2022-PRESENT Harlan Wilton