Custom Nodes · Unhead

[Unhead Home](https://unhead.unjs.io/ "Home")

- [Docs](https://unhead.unjs.io/docs/typescript/head/guides/get-started/overview)
- [Tools](https://unhead.unjs.io/tools)
- [Learn](https://unhead.unjs.io/learn/guides/what-is-capo)

[Releases](https://unhead.unjs.io/releases)

Search…```k`` /`

[Unhead on GitHub](https://github.com/unjs/unhead)

[User Guides](https://unhead.unjs.io/docs/typescript/head/guides/get-started/overview)

[API](https://unhead.unjs.io/docs/typescript/head/api/get-started/overview)

[Releases](https://unhead.unjs.io/docs/typescript/releases/v3)

TypeScript

- [Switch to TypeScript](https://unhead.unjs.io/docs/typescript/schema-org/guides/recipes/custom-nodes)
- [Switch to Vue](https://unhead.unjs.io/docs/vue/schema-org/guides/recipes/custom-nodes)
- [Switch to React](https://unhead.unjs.io/docs/react/schema-org/guides/recipes/custom-nodes)
- [Switch to Svelte](https://unhead.unjs.io/docs/svelte/schema-org/guides/recipes/custom-nodes)
- [Switch to Solid.js](https://unhead.unjs.io/docs/solid-js/schema-org/guides/recipes/custom-nodes)
- [Switch to Angular](https://unhead.unjs.io/docs/angular/schema-org/guides/recipes/custom-nodes)
- [Switch to Nuxt](https://unhead.unjs.io/docs/nuxt/schema-org/guides/recipes/custom-nodes)

v3 (stable)

Schema.org

- [Discord Support](https://discord.com/invite/275MBUBvgP)
- [TypeScript Playground](https://stackblitz.com/edit/github-hhxywsb5)

- Get Started
  - [Introduction](https://unhead.unjs.io/docs/typescript/schema-org/guides/get-started/overview)
- Core Concepts
  - [Deduping Nodes](https://unhead.unjs.io/docs/typescript/schema-org/guides/core-concepts/deduping-nodes)
  - [Supported Nodes](https://unhead.unjs.io/docs/typescript/schema-org/guides/core-concepts/nodes)
  - [Schema.org Params](https://unhead.unjs.io/docs/typescript/schema-org/guides/core-concepts/params)
- Recipes
  - [Custom Nodes](https://unhead.unjs.io/docs/typescript/schema-org/guides/recipes/custom-nodes)
  - [Identity](https://unhead.unjs.io/docs/typescript/schema-org/guides/recipes/identity)
  - [Blog](https://unhead.unjs.io/docs/typescript/schema-org/guides/recipes/blog)
  - [Breadcrumbs](https://unhead.unjs.io/docs/typescript/schema-org/guides/recipes/breadcrumbs)
  - [eCommerce](https://unhead.unjs.io/docs/typescript/schema-org/guides/recipes/e-commerce)
  - [FAQ](https://unhead.unjs.io/docs/typescript/schema-org/guides/recipes/faq)
  - [How To](https://unhead.unjs.io/docs/typescript/schema-org/guides/recipes/how-to)
  - [Site Search](https://unhead.unjs.io/docs/typescript/schema-org/guides/recipes/site-search)

Recipes

# Custom Nodes

[Copy for LLMs](https://raw.githubusercontent.com/unjs/unhead/refs/heads/main/docs/schema-org/2.guides/4.recipes/0.custom-nodes.md)

Last updated Apr 5, 2026 by [Harlan Wilton](https://github.com/harlan-zw) in [docs: documentation content audit and formatting improvements (#718)](https://github.com/unjs/unhead/pull/718).

On this page

- [Why Create Custom Schema.org Nodes?](#why-create-custom-schemaorg-nodes)
- [How Do I Add TypeScript Support for Custom Nodes?](#how-do-i-add-typescript-support-for-custom-nodes)
- [Related Recipes](#related-recipes)

**Quick Answer:** Create custom Schema.org nodes by passing a plain object to `useSchemaOrg()`. Use `@type` for the schema type and any valid Schema.org properties.

## [Why Create Custom Schema.org Nodes?](#why-create-custom-schemaorg-nodes)

If you need to add a node that isn't officially implemented, you can provide it yourself. This is useful for:

- Niche schema types not covered by built-in helpers
- Emerging schema types not yet added to the library
- Highly specific industry schemas

Custom nodes are plain objects following the [Schema.org specification](https://schema.org/docs/full.html).

```
import { useSchemaOrg } from '@unhead/schema-org/typescript'

useSchemaOrg([
  {
    '@type': 'SingleFamilyResidence',
    'numberOfRooms': 3,
    'occupancy': 5,
    'numberOfBathroomsTotal': 2,
    'floorSize': '2000 sqft',
    'petsAllowed': true,
  }
])
```

## [How Do I Add TypeScript Support for Custom Nodes?](#how-do-i-add-typescript-support-for-custom-nodes)

Use [schema-dts](https://github.com/google/schema-dts) for full TypeScript support with custom nodes.

```
import type { DefinedTerm } from 'schema-dts'
import { useSchemaOrg } from '@unhead/schema-org/typescript'

useSchemaOrg([
  <DefinedTerm> {
    '@type': 'DefinedTerm',
    'name': 'Unhead Schema.org',
    'description': 'Unhead Schema.org is a library for adding Schema.org to your application.',
    'inDefinedTermSet': {
      '@type': 'DefinedTermSet',
      'name': 'Schema.org Libraries',
    },
  }
])
```

## [Related Recipes](#related-recipes)

- [Setting Up Your Identity](https://unhead.unjs.io/docs/schema-org/guides/recipes/identity) - Define your organization/person
- [Blog Posts](https://unhead.unjs.io/docs/schema-org/guides/recipes/blog) - Article structured data
- [eCommerce](https://unhead.unjs.io/docs/schema-org/guides/recipes/e-commerce) - Product structured data

[Edit this page](https://github.com/unjs/unhead/edit/main/docs/schema-org/2.guides/4.recipes/0.custom-nodes.md)

[Markdown For LLMs](https://raw.githubusercontent.com/unjs/unhead/refs/heads/main/docs/schema-org/2.guides/4.recipes/0.custom-nodes.md)

Did this page help you?

[Schema.org Params Configure site-wide defaults for Schema.org with host, inLanguage, currency, and trailingSlash. Automatically cascade to all schema nodes.](https://unhead.unjs.io/docs/schema-org/guides/core-concepts/params) [Identity Set up Organization, Person, or LocalBusiness as your site identity. Enable Google Knowledge Panel and connect content to E-E-A-T signals.](https://unhead.unjs.io/docs/schema-org/guides/recipes/identity)

On this page

- [Why Create Custom Schema.org Nodes?](#why-create-custom-schemaorg-nodes)
- [How Do I Add TypeScript Support for Custom Nodes?](#how-do-i-add-typescript-support-for-custom-nodes)
- [Related Recipes](#related-recipes)

[GitHub](https://github.com/unjs/unhead) [ Discord](https://discord.com/invite/275MBUBvgP)

[ /llms.txt](https://unhead.unjs.io/llms.txt)

[Part of the UnJS ecosystem](https://unjs.io/)

### Head Management

- [Getting Started](https://unhead.unjs.io/docs/typescript/head/guides/get-started/overview)
- [useHead](https://unhead.unjs.io/docs/typescript/head/api/composables/use-head)
- [useSeoMeta](https://unhead.unjs.io/docs/typescript/head/api/composables/use-seo-meta)
- [useHeadSafe](https://unhead.unjs.io/docs/typescript/head/api/composables/use-head-safe)
- [useScript](https://unhead.unjs.io/docs/typescript/head/api/composables/use-script)

### Schema.org

- [Getting Started](https://unhead.unjs.io/docs/typescript/schema-org/guides/get-started/overview)
- [useSchemaOrg](https://unhead.unjs.io/docs/typescript/schema-org/api/composables/use-schema-org)
- [Nodes](https://unhead.unjs.io/docs/typescript/schema-org/guides/core-concepts/nodes)
- [Recipes](https://unhead.unjs.io/docs/typescript/schema-org/guides/recipes/identity)

### Guides

- [Titles](https://unhead.unjs.io/docs/typescript/head/guides/core-concepts/titles)
- [Streaming SSR](https://unhead.unjs.io/docs/typescript/head/guides/core-concepts/streaming)
- [DOM Events](https://unhead.unjs.io/docs/typescript/head/guides/core-concepts/dom-event-handling)
- [Plugins](https://unhead.unjs.io/docs/typescript/head/guides/plugins/template-params)

### Tools

- [Meta Tag Generator](https://unhead.unjs.io/tools/meta-tag-generator)
- [OG Image Generator](https://unhead.unjs.io/tools/og-image-generator)
- [Schema.org Generator](https://unhead.unjs.io/tools/schema-generator)
- [Capo.js Analyzer](https://unhead.unjs.io/tools/capo-analyzer)

### Articles

- [What is Capo.js?](https://unhead.unjs.io/learn/guides/what-is-capo)

### Research

- [State of <head> in 2026](https://unhead.unjs.io/learn/research/state-of-head-2026)
- [Streaming Head Performance](https://unhead.unjs.io/learn/research/streaming-head-performance)
- [Capo.js Performance Research](https://unhead.unjs.io/learn/research/capo-performance-research)

Copyright © 2025-2026 Harlan Wilton - [MIT License](https://github.com/unjs/unhead/blob/main/license)