Skip to content

Head

An Email Craft component which creates an HTML head element

TIP

This component is required for adding elements such as <style> and meta directly to the document

Install

Install the component from your command line

console
pnpm install email-craft
pnpm install email-craft
console
bun install email-craft
bun install email-craft
console
npm install email-craft
npm install email-craft
console
yarn install email-craft
yarn install email-craft

Usage

Add the component to your email template. Include children tags where needed.

jsx
import { Head } from 'email-craft';

const Email = () => {
  return (
    <Head>
      <title>My email title</title>
    </Head>
  );
};
import { Head } from 'email-craft';

const Email = () => {
  return (
    <Head>
      <title>My email title</title>
    </Head>
  );
};

Component Props

This component has no custom props, but expresses all of the Common Component Props for ComponentProps<'head'>.