//unheadbyarashsheyda

unhead

β–³ Universal document <head> tag manager. Tiny, adaptable and full-featured.

0
0
0

Unhead

NPM version NPM Downloads GitHub stars

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


Status: v1.1.0 Released
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 (supporting 0kb runtime)
  • 🍣 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

[beta]v0.13.0