Skip to content
/ unhead Public

Unhead is the any-framework document head manager built for performance and delightful developer experience.

License

Notifications You must be signed in to change notification settings

unjs/unhead

Repository files navigation

unhead

NPM version NPM Downloads GitHub stars

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


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

Highlights

  • 💎 Fully typed augmentable Schema powered by zhead
  • 🧑‍🤝‍🧑 Side-effect based DOM patching, plays nicely your existing other tags and attributes
  • 🤝 Built for everyone: Vue, React (soon), Svelte (soon), (more soon).
  • 🚀 Optimised, tiny SSR and DOM bundles
  • 🖥️ useServerHead for 0kb runtime head management
  • 🍣 Intuitive deduping, sorting, title templates, class merging and more
  • 🪝 Extensible hook / plugin based API

Install

npm i unhead

Usage

For specific frameworks integrations, see the docs.

Basic

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.' },
  ],
})

Docs

Visit the documentation site for guides and API reference.

Sponsors

License

MIT License © 2022-PRESENT Harlan Wilton

About

Unhead is the any-framework document head manager built for performance and delightful developer experience.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published