Skip to content
forked from unjs/unhead

The any-framework document head manager with a focus on delightful DX and performance.

Notifications You must be signed in to change notification settings

YunYouJun/unhead

 
 

Repository files navigation

Unhead

NPM version NPM Downloads GitHub stars

Universal document tag manager. Tiny, adaptable and full featured.


Status: v1.7 Released
Please report any issues 🐛
Made possible by my Sponsor Program 💖
Follow me @harlan_zw 🐦 • Join Discord for help

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 (952 bytes minzipped)
  • 🚀 Add-ons for extra oomph: Capo.js, Hash Hydration and Vite tree-shaking
  • 💎 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

Sponsors

License

MIT License © 2022-PRESENT Harlan Wilton

About

The any-framework document head manager with a focus on delightful DX and performance.

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages

  • TypeScript 100.0%