UNPKG

metafy-seo

Version:

Lightweight, SSR-safe React components and utilities for managing SEO metadata. Supports Next.js App Router, Vite, and any React environment.

28 lines (27 loc) 717 B
import React, { PropsWithChildren } from 'react'; import type { SeoConfig, SeoContextValue } from './types'; /** * Provider component for global SEO defaults. * * Wrap your app with SeoProvider to set site-wide defaults * that will be merged with individual SeoTags props. * * @example * ```tsx * <SeoProvider defaults={{ * titleTemplate: '%s | My Site', * twitter: { site: '@myhandle' } * }}> * <App /> * </SeoProvider> * ``` */ export declare const SeoProvider: React.FC<PropsWithChildren<{ defaults?: Partial<SeoConfig>; }>>; /** * Hook to access SEO context. * * Can be used without a provider - will return a no-op mergeConfig. */ export declare const useSeo: () => SeoContextValue;