Skip to content

Branding Configuration

Grundtone ships a single source of truth for logos and brand identity. The createBranding() factory centralises your brand name, tagline, and every logo variant so they stay consistent across web and React Native.


Logo Variants

Six PNG variants are generated from one high-resolution source file:

Variant keyFileDimensionsUse case
primarylogo.png1080 × 1080Hero images, splash screens
pwa512logo-512x512.png512 × 512PWA manifest (large)
pwa192logo-192x192.png192 × 192PWA manifest (small)
appleTouchIconlogo-180x180.png180 × 180Apple touch icon
favicon32logo-32x32.png32 × 32Browser favicon
favicon16logo-16x16.png16 × 16Browser favicon (small)

All assets live in packages/core/assets/ and are referenced by default at @grundtone/core/assets/<file>.


createBranding()

Import the factory from @grundtone/core and optionally pass overrides:

ts
import { createBranding } from '@grundtone/core';

// Use defaults
const branding = createBranding();

// Override selectively
const branding = createBranding({
  name: 'My App',
  tagline: 'Built with Grundtone',
  logos: {
    primary: '/img/my-logo.png',
  },
});

Only the properties you provide are overridden — everything else keeps its default value.


Types

ts
interface LogoVariants {
  primary: string;
  favicon32: string;
  favicon16: string;
  appleTouchIcon: string;
  pwa192: string;
  pwa512: string;
}

interface BrandingConfig {
  name: string;
  tagline: string;
  logos: LogoVariants;
}

createBranding() accepts an optional Partial<BrandingConfig> and returns a full BrandingConfig.


Regenerating Variants

If you replace the source logo at assets/logo/logo.png, regenerate every variant with:

bash
npx tsx scripts/generate-logo-variants.ts

The script uses sharp to resize the 1080 × 1080 source into the five smaller variants and copies them into packages/core/assets/.


Platform Integration

PlatformWhat to useDocs
WebbrandingHeadTags() for favicon injectionWeb Branding
React NativegetLogoSource() for <Image> usageRN Branding