# unhead

> Full-stack manager built for any framework.

Latest version **3.4.2** (published 2026-09-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install unhead
pnpm add unhead
yarn add unhead
bun add unhead
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.4.2 |
| Published | 2026-09-29 |
| First published | 2022-11-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 667.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1306 |
| Author | Harlan Wilton |
| Maintainers | harlan_zw |

## Links

- npm: https://www.npmjs.com/package/unhead
- Repository: https://github.com/unjs/unhead
- Homepage: https://unhead.unjs.io
- Issues: https://github.com/unjs/unhead/issues
- Funding: https://github.com/sponsors/harlan-zw
- npm.io page: https://npm.io/package/unhead

## Dependencies (2)

- [hookable](https://npm.io/package/hookable.md) ^6.1.1
- [unplugin](https://npm.io/package/unplugin.md) ^3.3.0

## Recent versions

- 3.4.2 (latest) — 2026-09-29
- 2.1.17 (2x) — 2026-08-04
- 3.0.0-rc.4 (rc) — 2026-04-09
- 3.0.0-beta.12 (beta) — 2026-03-10
- 3.0.0-beta.9 (next) — 2026-02-26
- 3.4.1 — 2026-09-15
- 3.4.0 — 2026-08-21
- 3.3.2 — 2026-08-13
- 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
- 2.1.16 — 2026-07-19
- 3.2.0 — 2026-07-19
- … 319 more at https://npm.io/package/unhead/versions

## README

# unhead

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

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]

## 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

```bash
# npm
npm install unhead

# yarn
yarn add unhead

# pnpm
pnpm add unhead
```

## Usage

### Basic Usage

```ts
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

```ts
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

```ts
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

```ts
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:

- **Vue**: [`@unhead/vue`](../vue)
- **React**: [`@unhead/react`](../react)
- **Angular**: [`@unhead/angular`](../angular)
- **Svelte**: [`@unhead/svelte`](../svelte)
- **SolidJS**: [`@unhead/solid-js`](../solid-js)

## Documentation

Visit the [documentation site](https://unhead.unjs.io/) for comprehensive guides and API references.

## License

[MIT](./LICENSE)

<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/unhead/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-version-href]: https://npmjs.com/package/unhead

[npm-downloads-src]: https://img.shields.io/npm/dm/unhead.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-downloads-href]: https://npmjs.com/package/unhead

[license-src]: https://img.shields.io/github/license/unjs/unhead.svg?style=flat&colorA=18181B&colorB=28CF8D
[license-href]: https://github.com/unjs/unhead/blob/main/LICENSE

---
_Source: https://npm.io/package/unhead · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
