function getCompleteFaviconHtml
getCompleteFaviconHtml(
variant?: FaviconVariant,
baseUrl?: string,
): string

Generate complete meta and link tags for favicons including theme color

Examples

Example 1

const headTags = getCompleteFaviconHtml('darkblue', '/assets/favicons');
// Includes: theme-color meta + all favicon links

Parameters

optional
variant: FaviconVariant = darkblue
  • The color variant to use
optional
baseUrl: string = /assets/favicons
  • Base URL/path where favicons are hosted

Return Type

string

HTML string with meta theme-color and all link tags

Usage

import { getCompleteFaviconHtml } from ".";