unhead

Full-stack <head> manager built for any framework.

MIT 330 个版本
安装
npm install unhead
yarn add unhead
pnpm add unhead
bun add unhead
README

unhead

Full-stack <head> manager built for any framework

npm version npm downloads License

Features

  • 🚀 Framework agnostic - works with any framework
  • 🔄 Reactive head management
  • 🔍 SEO-friendly with rich meta tag support
  • 🖥️ Server-side rendering support
  • 📦 Lightweight and tree-shakable
  • ⚡ Performance optimized with minimal runtime overhead
  • 🎯 Type-safe with full TypeScript support

Installation

# npm
npm install unhead

# yarn
yarn add unhead

# pnpm
pnpm add unhead

Usage

Basic Usage

import { createHead, useHead } from 'unhead'

// Create a head instance
const head = createHead()

// Use head tags
useHead({
  title: 'My App',
  meta: [
    {
      name: 'description',
      content: 'My awesome application'
    }
  ]
}, { head })

Server-Side Rendering

import { createHead } from 'unhead/server'

const head = createHead()

// Add head entries
useHead({
  title: 'SSR App',
  meta: [{ name: 'description', content: 'Server-rendered app' }]
}, { head })

// Render head tags
const { headTags, bodyTags } = head.render()

Client-Side Rendering

import { createHead } from 'unhead/client'

// Create head instance (auto-renders on changes)
const head = createHead()

// Add reactive head entries
useHead({
  title: 'Client App'
}, { head })

Custom Renderers

import { createServerRenderer, createUnhead } from 'unhead/server'

// Create a custom renderer with options
const renderer = createServerRenderer({ omitLineBreaks: true })

// Pass renderer to createUnhead
const head = createUnhead(renderer, { /* options */ })

// Render using head.render()
const html = head.render()

Framework Integrations

Unhead provides optimized integrations for popular frameworks:

Documentation

Visit the documentation site for comprehensive guides and API references.

License

MIT

版本列表
3.3.1 2026-08-04
3.3.0 2026-08-03
3.2.3 2026-07-22
3.2.2 2026-07-22
3.2.1 2026-07-19
3.2.0 2026-07-19
3.1.8 2026-07-12
3.1.7 2026-07-01
3.1.6 2026-06-25
3.1.5 2026-06-24
3.1.4 2026-06-12
3.1.3 2026-06-05
3.1.2 2026-06-05
3.1.1 2026-05-27
3.1.0 2026-04-27
3.0.5 2026-04-22
3.0.4 2026-04-14
3.0.3 2026-04-12
3.0.2 2026-04-10
3.0.1 2026-04-10
3.0.0-rc.4 2026-04-09
3.0.0-rc.3 2026-04-09
3.0.0-rc.1 2026-04-09
3.0.0-beta.12 2026-03-10
3.0.0-beta.11 2026-03-02
3.0.0-beta.10 2026-02-26
3.0.0-beta.9 2026-02-26
3.0.0-beta.8 2026-02-25
3.0.0-beta.7 2026-02-24
3.0.0-beta.6 2026-02-06
3.0.0-beta.5 2026-01-05
3.0.0-beta.4 2025-12-24
3.0.0-beta.2 2025-12-24
3.0.0-beta.1 2025-12-24
3.0.0 2026-04-09
2.1.17 2026-08-04
2.1.16 2026-07-19
2.1.15 2026-05-08
2.1.13 2026-04-05
2.1.12 2026-03-10
2.1.11 2026-03-10
2.1.10 2026-03-02
2.1.9 2026-02-26
2.1.8 2026-02-26
2.1.7 2026-02-25
2.1.6 2026-02-24
2.1.5 2026-02-24
2.1.4 2026-02-08
2.1.3 2026-02-06
2.1.2 2026-01-11
2.1.1 2025-12-24
2.1.0 2025-12-24
2.0.19 2025-10-08
2.0.18 2025-10-07
2.0.17 2025-09-18
2.0.16 2025-09-18
2.0.15 2025-09-18
2.0.14 2025-08-05
2.0.13 2025-07-31
2.0.12 2025-07-06
2.0.11 2025-06-24
2.0.10 2025-05-23
2.0.9 2025-05-18
2.0.8 2025-04-16
2.0.7 2025-04-16
2.0.6 2025-04-16
2.0.5 2025-04-07
2.0.4 2025-04-06
2.0.3 2025-04-02
2.0.2 2025-03-26
2.0.1 2025-03-25
2.0.0-rc.13 2025-03-13
2.0.0-rc.12 2025-03-13
2.0.0-rc.11 2025-03-13
2.0.0-rc.10 2025-03-11
2.0.0-rc.9 2025-03-08
2.0.0-rc.8 2025-03-08
2.0.0-rc.7 2025-03-07
2.0.0-rc.6 2025-03-07
2.0.0-rc.5 2025-03-06
2.0.0-rc.3 2025-03-06
2.0.0-rc.2 2025-03-06
2.0.0-rc.1 2025-03-04
2.0.0-beta.2 2025-03-01
2.0.0-beta.1 2025-03-01
2.0.0-beta.0 2025-02-28
2.0.0-alpha.32 2025-02-28
2.0.0-alpha.31 2025-02-28
2.0.0-alpha.30 2025-02-28
2.0.0-alpha.29 2025-02-28
2.0.0-alpha.28 2025-02-28
2.0.0-alpha.27 2025-02-27
2.0.0-alpha.26 2025-02-26
2.0.0-alpha.25 2025-02-26
2.0.0-alpha.24 2025-02-26
2.0.0-alpha.23 2025-02-26
2.0.0-alpha.22 2025-02-25
2.0.0-alpha.21 2025-02-25
2.0.0-alpha.20 2025-02-25
2.0.0-alpha.19 2025-02-21
2.0.0-alpha.18 2025-02-21
2.0.0-alpha.17 2025-02-20
2.0.0-alpha.16 2025-02-15
2.0.0-alpha.15 2025-02-15
2.0.0-alpha.14 2025-02-15
2.0.0-alpha.13 2025-02-14
2.0.0-alpha.12 2025-02-14
2.0.0-alpha.11 2025-02-14
2.0.0-alpha.10 2025-02-14
2.0.0-alpha.9 2025-02-05
2.0.0-alpha.8 2025-02-02
2.0.0-alpha.7 2025-01-22
2.0.0-alpha.6 2025-01-21
2.0.0-alpha.5 2025-01-21
2.0.0-alpha.4 2025-01-21
2.0.0-alpha.3 2025-01-21
2.0.0-alpha.2 2025-01-13
2.0.0-alpha.1 2025-01-13
2.0.0-alpha.0 2025-01-13
2.0.0 2025-03-23
1.11.20 2025-02-25
1.11.19 2025-02-14
1.11.18 2025-01-14
1.11.16 2025-01-13
1.11.15 2025-01-07
1.11.14 2024-12-10
1.11.13 2024-11-25
1.11.12 2024-11-25
1.11.11 2024-11-04
1.11.10 2024-10-16
1.11.9 2024-10-14
1.11.8 2024-10-14
1.11.7 2024-09-29
1.11.6 2024-09-16
1.11.5 2024-09-15
1.11.4 2024-09-15
1.11.3 2024-09-15
1.11.2 2024-09-09
1.11.1 2024-09-08
1.11.0-beta.4 2024-09-08
1.11.0-beta.3 2024-09-08
1.11.0-beta.2 2024-09-08
1.11.0-beta.1 2024-09-07
1.11.0 2024-09-08
1.10.4 2024-09-03
1.10.3 2024-09-03
1.10.2 2024-09-02
1.10.1 2024-09-02
1.10.0-beta.6 2024-08-20
1.10.0-beta.5 2024-08-20
1.10.0-beta.4 2024-08-20
1.10.0-beta.3 2024-08-20
1.10.0-beta.1 2024-08-19
1.10.0 2024-08-20
1.9.16 2024-07-14
1.9.15 2024-07-04
1.9.14 2024-06-20
1.9.13 2024-06-13
1.9.12 2024-06-02
1.9.11 2024-05-22
1.9.10 2024-05-07
1.9.9 2024-05-03
1.9.8 2024-05-01
1.9.7 2024-04-19
1.9.6 2024-04-19
1.9.5 2024-04-12
1.9.4 2024-04-01
1.9.3 2024-03-29
1.9.2 2024-03-27
1.9.1 2024-03-25
1.9.0 2024-03-25
1.8.20 2024-03-16
1.8.19 2024-03-16
1.8.18 2024-03-14
1.8.17 2024-03-14
1.8.16 2024-03-13
1.8.15 2024-03-13
1.8.14 2024-03-12
1.8.13 2024-03-11
1.8.12 2024-03-08
1.8.11 2024-03-04
1.8.10 2024-01-16
1.8.9 2023-12-08
1.8.8 2023-11-23
1.8.7 2023-11-21
1.8.6 2023-11-21
1.8.5 2023-11-21
1.8.4 2023-11-16
1.8.3 2023-11-04
1.8.2 2023-11-01
1.8.1 2023-10-29
1.8.0-beta.15 2023-10-27
1.8.0-beta.14 2023-10-27
1.8.0-beta.13 2023-10-26
1.8.0-beta.12 2023-10-05
1.8.0-beta.11 2023-10-05
1.8.0-beta.10 2023-10-05
1.8.0-beta.9 2023-10-05
1.8.0-beta.8 2023-10-04
1.8.0-beta.7 2023-10-04
1.8.0-beta.6 2023-10-04
1.8.0-beta.5 2023-10-04
1.8.0-beta.2 2023-09-28
1.8.0-beta.1 2023-09-28
1.8.0-beta.0 2023-09-28
1.8.0 2023-10-28
1.7.4 2023-09-16
1.7.3 2023-09-14
1.7.2 2023-09-13
1.7.0 2023-09-12
1.6.2 2023-09-10
1.6.1 2023-09-10
1.6.0 2023-09-10
1.5.5 2023-09-09
1.5.4 2023-09-07
1.5.3 2023-09-06
1.5.2 2023-09-05
1.5.1 2023-09-04
1.5.0 2023-09-03
1.4.1 2023-08-31
1.4.0 2023-08-31
1.3.9 2023-08-27
1.3.8 2023-08-26
1.3.7 2023-08-23
1.3.5 2023-08-19
1.3.4 2023-08-15
1.3.3 2023-08-14
1.3.2 2023-08-14
1.3.1 2023-08-14
1.3.0-beta.2 2023-08-14
1.3.0-beta.1 2023-08-13
1.3.0-beta.0 2023-08-13
1.3.0 2023-08-14
1.2.2 2023-08-02
1.2.1 2023-08-01
1.1.35 2023-07-31
1.1.34 2023-07-30
1.1.33 2023-07-28
1.1.32 2023-07-17
1.1.31 2023-07-17
1.1.30 2023-07-05
1.1.29 2023-07-01
1.1.28 2023-06-26
1.1.27 2023-05-18
1.1.26 2023-04-17
1.1.25 2023-03-25
1.1.23 2023-03-13
1.1.22 2023-03-09
1.1.21 2023-03-08
1.1.20 2023-03-07
1.1.19 2023-03-07
1.1.17 2023-03-06
1.1.16 2023-03-05
1.1.15 2023-03-02
1.1.14 2023-02-28
1.1.13 2023-02-28
1.1.12 2023-02-28
1.1.11 2023-02-27
1.1.10 2023-02-27
1.1.9 2023-02-26
1.1.8 2023-02-26
1.1.7 2023-02-26
1.1.6 2023-02-26
1.1.5 2023-02-25
1.1.4 2023-02-25
1.1.3 2023-02-25
1.1.2 2023-02-25
1.1.1 2023-02-25
1.1.0 2023-02-24
1.0.22 2023-02-16
1.0.21 2023-02-06
1.0.20 2023-01-30
1.0.18 2023-01-22
1.0.17 2023-01-18
1.0.16 2023-01-17
1.0.15 2023-01-10
1.0.14 2022-12-23
1.0.13 2022-12-08
1.0.12 2022-12-08
1.0.11 2022-12-08
1.0.10 2022-12-07
1.0.9 2022-12-07
1.0.8 2022-12-07
1.0.7 2022-12-04
1.0.6 2022-12-01
1.0.5 2022-12-01
1.0.4 2022-11-22
1.0.3 2022-11-21
1.0.2 2022-11-17
1.0.1 2022-11-16
1.0.0 2022-11-16
0.7.1 2022-11-16
0.7.0 2022-11-16
0.6.9 2022-11-15
0.6.8 2022-11-15
0.6.7 2022-11-15
0.6.6 2022-11-14
0.6.5 2022-11-14
0.6.4 2022-11-14
0.6.3 2022-11-14
0.6.2 2022-11-13
0.6.1 2022-11-13
0.6.0 2022-11-12
0.5.1 2022-11-11
0.4.8 2022-11-11
0.4.7 2022-11-11
0.4.6 2022-11-11
0.4.5 2022-11-11
0.4.4 2022-11-11
0.4.3 2022-11-11
0.4.2 2022-11-11
0.4.1 2022-11-10
0.3.1 2022-11-10
0.2.7 2022-11-09
0.2.6 2022-11-09
0.2.5 2022-11-09
0.2.4 2022-11-09
0.2.3 2022-11-09
0.2.0 2022-11-08
0.1.4 2022-11-08
0.1.3 2022-11-08
0.1.2 2022-11-08
0.1.1 2022-11-08
0.1.0 2022-11-08
0.0.7 2022-11-07
0.0.6 2022-11-07
0.0.5 2022-11-07
0.0.4 2022-11-07
0.0.2 2022-11-07
0.0.1 2022-11-03