@molecule/app-oauth-logos-angular

Feature · oauth-logos · App (browser) · v1.2.2 · Apache-2.0

Canonical OAuth provider brand logos (GitHub, Google, GitLab, Twitter/X, Apple, Facebook, Microsoft, LinkedIn, Discord) as Angular SVG components — identical across every app regardless of icon bond

npm install @molecule/app-oauth-logos-angular

npm · Source on GitHub

How it works

@molecule/app-oauth-logos-angular is a ready-made oauth-logos feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.

import { Component } from '@angular/core'
import { getClassMap, type UIClassMap } from '@molecule/app-ui'
import { OAuthProviderLogo } from '@molecule/app-oauth-logos-angular'

@Component({
  selector: 'app-oauth-button',
  standalone: true,
  imports: [OAuthProviderLogo],
  template: `
    <button type="button" [class]="cm().myButtonChrome">
      <mol-oauth-provider-logo [provider]="'github'" [size]="20" />
      <span>Continue with GitHub</span>
    </button>
  `,
})
export class OauthButton {
  cm(): UIClassMap {
    return getClassMap()
  }
}

Works with: @molecule/app-angular

Reference

Canonical OAuth provider brand logos — the Angular counterpart of @molecule/app-oauth-logos-react (the same runtime export names, the same props, and the same rendered DOM for the same input).

Ships every logo as a self-contained standalone Angular SVG component with a normalized 24×24 viewBox and a mode input ('brand' default — the official multi-color mark — or 'mono' — currentColor for uniform-theme button rows).

Unlike resolving icons through @molecule/app-icons, these logos are bundled inline so every app renders pixel-identical marks regardless of which icon-set bond is wired.

Exports:

  • OAuthProviderLogo (provider="github"|"google"|...) — dispatcher.
  • Individual logos: GitHubLogo, GoogleLogo, GitLabLogo, TwitterLogo / XLogo, AppleLogo, FacebookLogo, MicrosoftLogo, LinkedInLogo, DiscordLogo.
  • OAuthProviderId, OAuthLogoProps types.

Every logo component's host names the native element React renders at its root: an attribute selector on the <svg> (svg[mol-github-logo]). The dispatcher's React root is a fragment, so everything its host holds (the dispatched <svg> or the fallback content) renders in the host's place and the host itself leaves the page, contributing no DOM of its own.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

import { Component } from '@angular/core'
import { getClassMap, type UIClassMap } from '@molecule/app-ui'
import { OAuthProviderLogo } from '@molecule/app-oauth-logos-angular'

@Component({
  selector: 'app-oauth-button',
  standalone: true,
  imports: [OAuthProviderLogo],
  template: `
    <button type="button" [class]="cm().myButtonChrome">
      <mol-oauth-provider-logo [provider]="'github'" [size]="20" />
      <span>Continue with GitHub</span>
    </button>
  `,
})
export class OauthButton {
  cm(): UIClassMap {
    return getClassMap()
  }
}

Type

feature

Installation

npm install @molecule/app-oauth-logos-angular @angular/common @angular/core @angular/platform-browser @molecule/app-angular

API

Interfaces

OAuthProviderLogoProps

Props for OAuthProviderLogo — the same shape as React's OAuthProviderLogoProps. Every member is a component input, except fallback, which is the content projected into [slot=fallback].

interface OAuthProviderLogoProps extends OAuthLogoProps {
  /** The provider id (a canonical `OAuthProviderId` or any other string). */
  provider: OAuthProviderId | string
  /**
   * Rendered when `provider` has no registered logo (default: nothing).
   * In Angular this is projected content: `<ng-content select="[slot=fallback]">`,
   * the counterpart of React's `fallback` prop.
   */
  fallback?: unknown
}

OAuthLogoProps

Props shared by all OAuth provider logo components.

interface OAuthLogoProps {
  /**
   * Rendered size in pixels (applied to both width and height). Defaults to 20.
   *
   * Every logo is authored at a normalized 24×24 viewBox so scaling is
   * identical across providers at any size — the logo's visual weight
   * matches exactly between apps.
   */
  size?: number
  /** Optional className on the outer SVG element. */
  className?: string
  /**
   * Color mode. Defaults to `'brand'` (official multi-color marks).
   * Use `'mono'` to render in `currentColor` — useful for uniform
   * monochrome rows that match the button text color.
   */
  mode?: 'brand' | 'mono'
  /**
   * Accessible label. Defaults to the provider's brand name
   * (e.g., `"GitHub"`, `"Google"`). Pass `''` to mark the logo
   * `aria-hidden` (typical when the button itself has an aria-label).
   */
  ariaLabel?: string
  /** Optional title rendered as `<title>` for hover tooltips. */
  title?: string
}

Types

OAuthProviderId

Canonical list of supported providers.

type OAuthProviderId =
  | 'github'
  | 'gitlab'
  | 'google'
  | 'twitter'
  | 'x'
  | 'apple'
  | 'facebook'
  | 'microsoft'
  | 'linkedin'
  | 'discord'

Classes

Apple logo. Monochrome only — mode ignored.

The host IS the <svg> (svg[mol-apple-logo]), matching React's root. Defaults apply when an input is never bound OR is bound undefined (React's absent-prop default).

@Component({
  selector: 'svg[mol-apple-logo]',
  standalone: true,
  inputs: ['size', 'className', 'mode', 'ariaLabel', 'title'],
  host: {
    xmlns: 'http://www.w3.org/2000/svg',
    translate: 'no',
    fill: 'currentColor',
    viewBox: '0 0 24 24',
    '[attr.width]': 'attrSize()',
    '[attr.height]': 'attrSize()',
    '[attr.role]': 'label() ? "img" : null',
    '[attr.aria-label]': 'label() || null',
    '[attr.aria-hidden]': 'label() ? null : "true"',
    '[class]': 'className',
  },
  template: `@if (title) {
      <svg:title>{{ title }}</svg:title>
    }
    <svg:path
      d="M17.05 12.53c-.02-2.77 2.26-4.1 2.36-4.16-1.28-1.88-3.28-2.14-3.99-2.17-1.7-.17-3.31 1-4.17 1-.88 0-2.2-.98-3.62-.96-1.86.03-3.58 1.08-4.54 2.75-1.93 3.36-.49 8.34 1.39 11.07.92 1.34 2.01 2.84 3.44 2.78 1.38-.06 1.9-.9 3.57-.9 1.66 0 2.14.9 3.6.87 1.49-.02 2.43-1.36 3.34-2.7 1.05-1.55 1.49-3.05 1.51-3.13-.03-.01-2.9-1.11-2.9-4.45zM14.16 4.48c.75-.92 1.26-2.19 1.12-3.46-1.08.04-2.4.72-3.18 1.63-.7.8-1.31 2.1-1.15 3.34 1.21.09 2.45-.61 3.21-1.51z"
    />`,
})
export class AppleLogo {
  /** Rendered size in pixels (both width and height). */
  size: number | undefined = 20
  /** Optional className on the outer SVG element. */
  className?: string
  /** Accessible label; `''` marks the logo `aria-hidden`. */
  ariaLabel: string | undefined = 'Apple'
  /**
   * Accepted for prop parity (`OAuthLogoProps.mode`); this mark is
   * monochrome only, so `mode` is ignored — the same prop React
   * destructures away.
   */
  mode?: 'brand' | 'mono'
  /** Optional title rendered as `<title>` for hover tooltips. */
  title?: string

  /**
   * The rendered size (the default applies when a binding writes
   * `undefined` over the field default, matching React's absent-prop default).
   * @returns The pixel size.
   */
  attrSize(): number {
    return this.size ?? 20
  }

  /**
   * The accessible label (React's default when the input was never set).
   * @returns The label text.
   */
  label(): string {
    return this.ariaLabel ?? 'Apple'
  }
}

Discord brand mark. mode='brand' renders the official blurple logo; mode='mono' renders in currentColor.

The host IS the <svg> (svg[mol-discord-logo]), matching React's root. Defaults apply when an input is never bound OR is bound undefined (React's absent-prop default).

@Component({
  selector: 'svg[mol-discord-logo]',
  standalone: true,
  inputs: ['size', 'className', 'mode', 'ariaLabel', 'title'],
  host: {
    xmlns: 'http://www.w3.org/2000/svg',
    translate: 'no',
    viewBox: '0 0 24 24',
    '[attr.width]': 'attrSize()',
    '[attr.height]': 'attrSize()',
    '[attr.role]': 'label() ? "img" : null',
    '[attr.aria-label]': 'label() || null',
    '[attr.aria-hidden]': 'label() ? null : "true"',
    '[attr.fill]': 'isMono() ? "currentColor" : "#5865F2"',
    '[class]': 'className',
  },
  template: `@if (title) {
      <svg:title>{{ title }}</svg:title>
    }
    <svg:path
      d="M20.317 4.3698a19.7913 19.7913 0 0 0-4.8851-1.5152.0741.0741 0 0 0-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 0 0-.0785-.037 19.7363 19.7363 0 0 0-4.8852 1.515.0699.0699 0 0 0-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 0 0 .0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 0 0 .0842-.0276 14.2064 14.2064 0 0 0 1.2254-1.9941.076.076 0 0 0-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 0 1-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 0 1 .0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 0 1 .0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 0 1-.0066.1276 12.2986 12.2986 0 0 1-1.873.8914.0766.0766 0 0 0-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 0 0 .0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 0 0 .0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 0 0-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"
    />`,
})
export class DiscordLogo {
  /** Rendered size in pixels (both width and height). */
  size: number | undefined = 20
  /** Optional className on the outer SVG element. */
  className?: string
  /** Color mode: `'brand'` (default) or `'mono'` (`currentColor`). */
  mode: 'brand' | 'mono' | undefined = 'brand'
  /** Accessible label; `''` marks the logo `aria-hidden`. */
  ariaLabel: string | undefined = 'Discord'
  /** Optional title rendered as `<title>` for hover tooltips. */
  title?: string

  /**
   * Whether the mark renders in `currentColor` (the `'brand'` default
   * applies when a binding writes `undefined` over the field default).
   * @returns True when `mode` is `'mono'`.
   */
  isMono(): boolean {
    return (this.mode ?? 'brand') === 'mono'
  }

  /**
   * The rendered size (the default applies when a binding writes
   * `undefined` over the field default).
   * @returns The pixel size.
   */
  attrSize(): number {
    return this.size ?? 20
  }

  /**
   * The accessible label (React's default when the input was never set).
   * @returns The label text.
   */
  label(): string {
    return this.ariaLabel ?? 'Discord'
  }
}

Facebook "f" mark. mode='brand' renders the blue circle with white "f"; mode='mono' renders a monochrome "f" in currentColor.

The host IS the <svg> (svg[mol-facebook-logo]), matching React's root. Defaults apply when an input is never bound OR is bound undefined (React's absent-prop default).

@Component({
  selector: 'svg[mol-facebook-logo]',
  standalone: true,
  inputs: ['size', 'className', 'mode', 'ariaLabel', 'title'],
  host: {
    xmlns: 'http://www.w3.org/2000/svg',
    translate: 'no',
    viewBox: '0 0 24 24',
    '[attr.width]': 'attrSize()',
    '[attr.height]': 'attrSize()',
    '[attr.role]': 'label() ? "img" : null',
    '[attr.aria-label]': 'label() || null',
    '[attr.aria-hidden]': 'label() ? null : "true"',
    '[attr.fill]': 'isMono() ? "currentColor" : null',
    '[class]': 'className',
  },
  template: `@if (title) {
      <svg:title>{{ title }}</svg:title>
    }
    @if (isMono()) {
      <svg:path
        d="M13.397 20.997v-8.196h2.765l.411-3.209h-3.176V7.548c0-.926.258-1.56 1.587-1.56h1.684V3.127A22.336 22.336 0 0 0 14.201 3c-2.444 0-4.122 1.492-4.122 4.231v2.355H7.332v3.209h2.753v8.202h3.312z"
      />
    } @else {
      <svg:path
        d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46H15.19c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z"
        fill="#1877F2"
      />
      <svg:path
        d="M13.397 20.997v-8.196h2.765l.411-3.209h-3.176V7.548c0-.926.258-1.56 1.587-1.56h1.684V3.127A22.336 22.336 0 0 0 14.201 3c-2.444 0-4.122 1.492-4.122 4.231v2.355H7.332v3.209h2.753v8.202h3.312z"
        fill="#fff"
      />
    }`,
})
export class FacebookLogo {
  /** Rendered size in pixels (both width and height). */
  size: number | undefined = 20
  /** Optional className on the outer SVG element. */
  className?: string
  /** Color mode: `'brand'` (default) or `'mono'` (`currentColor`). */
  mode: 'brand' | 'mono' | undefined = 'brand'
  /** Accessible label; `''` marks the logo `aria-hidden`. */
  ariaLabel: string | undefined = 'Facebook'
  /** Optional title rendered as `<title>` for hover tooltips. */
  title?: string

  /**
   * Whether the mark renders in `currentColor` (the `'brand'` default
   * applies when a binding writes `undefined` over the field default).
   * @returns True when `mode` is `'mono'`.
   */
  isMono(): boolean {
    return (this.mode ?? 'brand') === 'mono'
  }

  /**
   * The rendered size (the default applies when a binding writes
   * `undefined` over the field default).
   * @returns The pixel size.
   */
  attrSize(): number {
    return this.size ?? 20
  }

  /**
   * The accessible label (React's default when the input was never set).
   * @returns The label text.
   */
  label(): string {
    return this.ariaLabel ?? 'Facebook'
  }
}

GitHub Octocat brand mark.

Brand guideline: monochrome only — no brand color, so mode is ignored (always uses currentColor). Typical placement: against a dark or neutral background.

The host IS the <svg> (svg[mol-github-logo]), matching React's root. Defaults apply when an input is never bound OR is bound undefined (React's absent-prop default).

@Component({
  selector: 'svg[mol-github-logo]',
  standalone: true,
  inputs: ['size', 'className', 'mode', 'ariaLabel', 'title'],
  host: {
    xmlns: 'http://www.w3.org/2000/svg',
    translate: 'no',
    fill: 'currentColor',
    viewBox: '0 0 24 24',
    '[attr.width]': 'attrSize()',
    '[attr.height]': 'attrSize()',
    '[attr.role]': 'label() ? "img" : null',
    '[attr.aria-label]': 'label() || null',
    '[attr.aria-hidden]': 'label() ? null : "true"',
    '[class]': 'className',
  },
  template: `@if (title) {
      <svg:title>{{ title }}</svg:title>
    }
    <svg:path
      d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"
    />`,
})
export class GitHubLogo {
  /** Rendered size in pixels (both width and height). */
  size: number | undefined = 20
  /** Optional className on the outer SVG element. */
  className?: string
  /** Accessible label; `''` marks the logo `aria-hidden`. */
  ariaLabel: string | undefined = 'GitHub'
  /**
   * Accepted for prop parity (`OAuthLogoProps.mode`); this mark is
   * monochrome only, so `mode` is ignored — the same prop React
   * destructures away.
   */
  mode?: 'brand' | 'mono'
  /** Optional title rendered as `<title>` for hover tooltips. */
  title?: string

  /**
   * The rendered size (the default applies when a binding writes
   * `undefined` over the field default, matching React's absent-prop default).
   * @returns The pixel size.
   */
  attrSize(): number {
    return this.size ?? 20
  }

  /**
   * The accessible label (React's default when the input was never set).
   * @returns The label text.
   */
  label(): string {
    return this.ariaLabel ?? 'GitHub'
  }
}

GitLab tanuki — official brand mark, normalized to a 24×24 viewBox. mode='mono' renders a flat tanuki silhouette in currentColor.

The host IS the <svg> (svg[mol-gitlab-logo]), matching React's root. Defaults apply when an input is never bound OR is bound undefined (React's absent-prop default).

@Component({
  selector: 'svg[mol-gitlab-logo]',
  standalone: true,
  inputs: ['size', 'className', 'mode', 'ariaLabel', 'title'],
  host: {
    xmlns: 'http://www.w3.org/2000/svg',
    translate: 'no',
    viewBox: '0 0 24 24',
    '[attr.width]': 'attrSize()',
    '[attr.height]': 'attrSize()',
    '[attr.role]': 'label() ? "img" : null',
    '[attr.aria-label]': 'label() || null',
    '[attr.aria-hidden]': 'label() ? null : "true"',
    '[class]': 'className',
  },
  template: `@if (title) {
      <svg:title>{{ title }}</svg:title>
    }
    @if (isMono()) {
      <svg:path
        fill="currentColor"
        d="M23.955 13.587l-1.342-4.135-2.664-8.189a.455.455 0 0 0-.866 0L16.419 9.45H7.582L4.916 1.263a.455.455 0 0 0-.866 0L1.386 9.452.045 13.587a.928.928 0 0 0 .336 1.039L12 22.928l11.62-8.302a.928.928 0 0 0 .335-1.039z"
      />
    } @else {
      <svg:path fill="#E24329" d="M12 21.42l4.212-12.96H7.788z" />
      <svg:path fill="#FCA326" d="M12 21.42l-4.212-12.96H1.883z" />
      <svg:path fill="#E24329" d="M1.883 8.46L.605 12.39a.87.87 0 0 0 .316.972L12 21.42z" />
      <svg:path fill="#FC6D26" d="M1.883 8.46h5.905L5.25.639a.432.432 0 0 0-.82 0z" />
      <svg:path fill="#FCA326" d="M12 21.42l4.212-12.96h5.905z" />
      <svg:path fill="#E24329" d="M22.117 8.46l1.278 3.93a.87.87 0 0 1-.316.972L12 21.42z" />
      <svg:path fill="#FC6D26" d="M22.117 8.46h-5.905L18.75.639a.432.432 0 0 1 .82 0z" />
    }`,
})
export class GitLabLogo {
  /** Rendered size in pixels (both width and height). */
  size: number | undefined = 20
  /** Optional className on the outer SVG element. */
  className?: string
  /** Color mode: `'brand'` (default) or `'mono'` (`currentColor`). */
  mode: 'brand' | 'mono' | undefined = 'brand'
  /** Accessible label; `''` marks the logo `aria-hidden`. */
  ariaLabel: string | undefined = 'GitLab'
  /** Optional title rendered as `<title>` for hover tooltips. */
  title?: string

  /**
   * Whether the mark renders in `currentColor` (the `'brand'` default
   * applies when a binding writes `undefined` over the field default).
   * @returns True when `mode` is `'mono'`.
   */
  isMono(): boolean {
    return (this.mode ?? 'brand') === 'mono'
  }

  /**
   * The rendered size (the default applies when a binding writes
   * `undefined` over the field default).
   * @returns The pixel size.
   */
  attrSize(): number {
    return this.size ?? 20
  }

  /**
   * The accessible label (React's default when the input was never set).
   * @returns The label text.
   */
  label(): string {
    return this.ariaLabel ?? 'GitLab'
  }
}

Google "G" mark — per Google brand guidelines the 4-color logo is required when space allows. In mode='mono' the logo flattens to currentColor for use inside monochrome button rows.

The host IS the <svg> (svg[mol-google-logo]), matching React's root. Defaults apply when an input is never bound OR is bound undefined (React's absent-prop default).

@Component({
  selector: 'svg[mol-google-logo]',
  standalone: true,
  inputs: ['size', 'className', 'mode', 'ariaLabel', 'title'],
  host: {
    xmlns: 'http://www.w3.org/2000/svg',
    translate: 'no',
    viewBox: '0 0 24 24',
    '[attr.width]': 'attrSize()',
    '[attr.height]': 'attrSize()',
    '[attr.role]': 'label() ? "img" : null',
    '[attr.aria-label]': 'label() || null',
    '[attr.aria-hidden]': 'label() ? null : "true"',
    '[class]': 'className',
  },
  template: `@if (title) {
      <svg:title>{{ title }}</svg:title>
    }
    @if (isMono()) {
      <svg:path
        fill="currentColor"
        d="M12 10.999h10.8c.1.7.2 1.3.2 2 0 5.5-3.7 10-11 10-6.1 0-11-4.9-11-11S5.9 1 12 1c3 0 5.5 1.1 7.4 2.9l-3 3c-.8-.8-2.2-1.8-4.4-1.8C8.1 5.1 4.9 8.4 4.9 12s3.2 6.9 7.1 6.9c4.5 0 6.2-3.2 6.5-4.9H12v-3z"
      />
    } @else {
      <svg:path
        fill="#4285F4"
        d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"
      />
      <svg:path
        fill="#34A853"
        d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
      />
      <svg:path
        fill="#FBBC05"
        d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
      />
      <svg:path
        fill="#EA4335"
        d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
      />
    }`,
})
export class GoogleLogo {
  /** Rendered size in pixels (both width and height). */
  size: number | undefined = 20
  /** Optional className on the outer SVG element. */
  className?: string
  /** Color mode: `'brand'` (default) or `'mono'` (`currentColor`). */
  mode: 'brand' | 'mono' | undefined = 'brand'
  /** Accessible label; `''` marks the logo `aria-hidden`. */
  ariaLabel: string | undefined = 'Google'
  /** Optional title rendered as `<title>` for hover tooltips. */
  title?: string

  /**
   * Whether the mark renders in `currentColor` (the `'brand'` default
   * applies when a binding writes `undefined` over the field default).
   * @returns True when `mode` is `'mono'`.
   */
  isMono(): boolean {
    return (this.mode ?? 'brand') === 'mono'
  }

  /**
   * The rendered size (the default applies when a binding writes
   * `undefined` over the field default).
   * @returns The pixel size.
   */
  attrSize(): number {
    return this.size ?? 20
  }

  /**
   * The accessible label (React's default when the input was never set).
   * @returns The label text.
   */
  label(): string {
    return this.ariaLabel ?? 'Google'
  }
}

LinkedIn brand mark. mode='brand' renders the blue square with white "in"; mode='mono' renders a monochrome "in" glyph.

The host IS the <svg> (svg[mol-linkedin-logo]), matching React's root. Defaults apply when an input is never bound OR is bound undefined (React's absent-prop default).

@Component({
  selector: 'svg[mol-linkedin-logo]',
  standalone: true,
  inputs: ['size', 'className', 'mode', 'ariaLabel', 'title'],
  host: {
    xmlns: 'http://www.w3.org/2000/svg',
    translate: 'no',
    viewBox: '0 0 24 24',
    '[attr.width]': 'attrSize()',
    '[attr.height]': 'attrSize()',
    '[attr.role]': 'label() ? "img" : null',
    '[attr.aria-label]': 'label() || null',
    '[attr.aria-hidden]': 'label() ? null : "true"',
    '[attr.fill]': 'isMono() ? "currentColor" : null',
    '[class]': 'className',
  },
  template: `@if (title) {
      <svg:title>{{ title }}</svg:title>
    }
    @if (isMono()) {
      <svg:path
        d="M6.94 5.00003C6.94 6.10463 6.04459 7.00004 4.94 7.00004C3.83541 7.00004 2.94 6.10463 2.94 5.00003C2.94 3.89543 3.83541 3.00003 4.94 3.00003C6.04459 3.00003 6.94 3.89543 6.94 5.00003ZM7 8.48003H3V21H7V8.48003ZM13.32 8.48003H9.34V21H13.28V14.43C13.28 10.77 18.05 10.43 18.05 14.43V21H22V13.07C22 6.90003 14.94 7.13003 13.28 10.16L13.32 8.48003Z"
      />
    } @else {
      <svg:path
        d="M20.452 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.356V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.063 2.063 0 112.063 2.065zm1.782 13.02H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
        fill="#0A66C2"
      />
    }`,
})
export class LinkedInLogo {
  /** Rendered size in pixels (both width and height). */
  size: number | undefined = 20
  /** Optional className on the outer SVG element. */
  className?: string
  /** Color mode: `'brand'` (default) or `'mono'` (`currentColor`). */
  mode: 'brand' | 'mono' | undefined = 'brand'
  /** Accessible label; `''` marks the logo `aria-hidden`. */
  ariaLabel: string | undefined = 'LinkedIn'
  /** Optional title rendered as `<title>` for hover tooltips. */
  title?: string

  /**
   * Whether the mark renders in `currentColor` (the `'brand'` default
   * applies when a binding writes `undefined` over the field default).
   * @returns True when `mode` is `'mono'`.
   */
  isMono(): boolean {
    return (this.mode ?? 'brand') === 'mono'
  }

  /**
   * The rendered size (the default applies when a binding writes
   * `undefined` over the field default).
   * @returns The pixel size.
   */
  attrSize(): number {
    return this.size ?? 20
  }

  /**
   * The accessible label (React's default when the input was never set).
   * @returns The label text.
   */
  label(): string {
    return this.ariaLabel ?? 'LinkedIn'
  }
}

Microsoft 4-square brand mark. mode='brand' renders the four official squares; mode='mono' renders a flat 2×2 grid in currentColor.

The host IS the <svg> (svg[mol-microsoft-logo]), matching React's root. Defaults apply when an input is never bound OR is bound undefined (React's absent-prop default).

@Component({
  selector: 'svg[mol-microsoft-logo]',
  standalone: true,
  inputs: ['size', 'className', 'mode', 'ariaLabel', 'title'],
  host: {
    xmlns: 'http://www.w3.org/2000/svg',
    translate: 'no',
    viewBox: '0 0 24 24',
    '[attr.width]': 'attrSize()',
    '[attr.height]': 'attrSize()',
    '[attr.role]': 'label() ? "img" : null',
    '[attr.aria-label]': 'label() || null',
    '[attr.aria-hidden]': 'label() ? null : "true"',
    '[class]': 'className',
  },
  template: `@if (title) {
      <svg:title>{{ title }}</svg:title>
    }
    @if (isMono()) {
      <svg:rect x="2" y="2" width="9" height="9" fill="currentColor" />
      <svg:rect x="13" y="2" width="9" height="9" fill="currentColor" opacity="0.85" />
      <svg:rect x="2" y="13" width="9" height="9" fill="currentColor" opacity="0.75" />
      <svg:rect x="13" y="13" width="9" height="9" fill="currentColor" opacity="0.6" />
    } @else {
      <svg:rect x="2" y="2" width="9" height="9" fill="#F25022" />
      <svg:rect x="13" y="2" width="9" height="9" fill="#7FBA00" />
      <svg:rect x="2" y="13" width="9" height="9" fill="#00A4EF" />
      <svg:rect x="13" y="13" width="9" height="9" fill="#FFB900" />
    }`,
})
export class MicrosoftLogo {
  /** Rendered size in pixels (both width and height). */
  size: number | undefined = 20
  /** Optional className on the outer SVG element. */
  className?: string
  /** Color mode: `'brand'` (default) or `'mono'` (`currentColor`). */
  mode: 'brand' | 'mono' | undefined = 'brand'
  /** Accessible label; `''` marks the logo `aria-hidden`. */
  ariaLabel: string | undefined = 'Microsoft'
  /** Optional title rendered as `<title>` for hover tooltips. */
  title?: string

  /**
   * Whether the mark renders in `currentColor` (the `'brand'` default
   * applies when a binding writes `undefined` over the field default).
   * @returns True when `mode` is `'mono'`.
   */
  isMono(): boolean {
    return (this.mode ?? 'brand') === 'mono'
  }

  /**
   * The rendered size (the default applies when a binding writes
   * `undefined` over the field default).
   * @returns The pixel size.
   */
  attrSize(): number {
    return this.size ?? 20
  }

  /**
   * The accessible label (React's default when the input was never set).
   * @returns The label text.
   */
  label(): string {
    return this.ariaLabel ?? 'Microsoft'
  }
}

Dispatcher: renders the canonical logo for a given provider id.

Use this in OAuth button rows so the button chrome (padding, radius, width, background) stays per-app while the logo itself is identical across every consumer.

React's root is a fragment (the dispatched logo, the fallback, or nothing), so everything the host holds renders in the host's place and the host itself leaves the page: no element of its own remains. An unknown provider renders nothing unless [slot=fallback] content is projected (React's fallback prop).

@Component({
  selector: 'mol-oauth-provider-logo',
  standalone: true,
  hostDirectives: [MolPlacement],
  imports: [
    AppleLogo,
    DiscordLogo,
    FacebookLogo,
    GitHubLogo,
    GitLabLogo,
    GoogleLogo,
    LinkedInLogo,
    MicrosoftLogo,
    TwitterLogo,
  ],
  inputs: ['provider', 'size', 'className', 'mode', 'ariaLabel', 'title'],
  template: `@switch (provider) {
    @case ('github') {
      <svg
        mol-github-logo
        [size]="size"
        [className]="className"
        [ariaLabel]="ariaLabel"
        [title]="title"
      />
    }
    @case ('gitlab') {
      <svg
        mol-gitlab-logo
        [size]="size"
        [className]="className"
        [mode]="mode"
        [ariaLabel]="ariaLabel"
        [title]="title"
      />
    }
    @case ('google') {
      <svg
        mol-google-logo
        [size]="size"
        [className]="className"
        [mode]="mode"
        [ariaLabel]="ariaLabel"
        [title]="title"
      />
    }
    @case ('twitter') {
      <svg
        mol-twitter-logo
        [size]="size"
        [className]="className"
        [ariaLabel]="ariaLabel"
        [title]="title"
      />
    }
    @case ('x') {
      <svg
        mol-twitter-logo
        [size]="size"
        [className]="className"
        [ariaLabel]="ariaLabel"
        [title]="title"
      />
    }
    @case ('apple') {
      <svg
        mol-apple-logo
        [size]="size"
        [className]="className"
        [ariaLabel]="ariaLabel"
        [title]="title"
      />
    }
    @case ('facebook') {
      <svg
        mol-facebook-logo
        [size]="size"
        [className]="className"
        [mode]="mode"
        [ariaLabel]="ariaLabel"
        [title]="title"
      />
    }
    @case ('microsoft') {
      <svg
        mol-microsoft-logo
        [size]="size"
        [className]="className"
        [mode]="mode"
        [ariaLabel]="ariaLabel"
        [title]="title"
      />
    }
    @case ('linkedin') {
      <svg
        mol-linkedin-logo
        [size]="size"
        [className]="className"
        [mode]="mode"
        [ariaLabel]="ariaLabel"
        [title]="title"
      />
    }
    @case ('discord') {
      <svg
        mol-discord-logo
        [size]="size"
        [className]="className"
        [mode]="mode"
        [ariaLabel]="ariaLabel"
        [title]="title"
      />
    }
    @default {
      <ng-content select="[slot=fallback]" />
    }
  }`,
})
export class OAuthProviderLogo {
  /** The provider id (a canonical `OAuthProviderId` or any other string). */
  provider!: string
  /** Forwarded to the dispatched logo: rendered size in pixels. */
  size?: number
  /** Forwarded to the dispatched logo: className on the outer SVG element. */
  className?: string
  /** Forwarded to the dispatched logo: color mode (`'brand'` default / `'mono'`). */
  mode?: 'brand' | 'mono'
  /** Forwarded to the dispatched logo: accessible label (`''` → `aria-hidden`). */
  ariaLabel?: string
  /** Forwarded to the dispatched logo: optional `<title>` text. */
  title?: string

  private readonly host: ElementRef<HTMLElement> = inject(ElementRef)

  constructor() {
    // React's root is a fragment: the dispatched logo (or the fallback content)
    // renders in the host's place, with nothing of the host left behind.
    usePlacement(() => {
      placeContentBefore(this.host.nativeElement, this.host.nativeElement)
      setElementPresent(this.host.nativeElement, false)
    })
  }
}

X (formerly Twitter) brand mark. Monochrome only per X brand guidelines; mode is ignored — always uses currentColor.

Use either <TwitterLogo/> or <XLogo/> — they render the same SVG. (XLogo is the same exported class.)

The host IS the <svg> (svg[mol-twitter-logo]), matching React's root. Defaults apply when an input is never bound OR is bound undefined (React's absent-prop default).

@Component({
  selector: 'svg[mol-twitter-logo]',
  standalone: true,
  inputs: ['size', 'className', 'mode', 'ariaLabel', 'title'],
  host: {
    xmlns: 'http://www.w3.org/2000/svg',
    translate: 'no',
    fill: 'currentColor',
    viewBox: '0 0 24 24',
    '[attr.width]': 'attrSize()',
    '[attr.height]': 'attrSize()',
    '[attr.role]': 'label() ? "img" : null',
    '[attr.aria-label]': 'label() || null',
    '[attr.aria-hidden]': 'label() ? null : "true"',
    '[class]': 'className',
  },
  template: `@if (title) {
      <svg:title>{{ title }}</svg:title>
    }
    <svg:path
      d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
    />`,
})
export class TwitterLogo {
  /** Rendered size in pixels (both width and height). */
  size: number | undefined = 20
  /** Optional className on the outer SVG element. */
  className?: string
  /** Accessible label; `''` marks the logo `aria-hidden`. */
  ariaLabel: string | undefined = 'X (Twitter)'
  /**
   * Accepted for prop parity (`OAuthLogoProps.mode`); this mark is
   * monochrome only, so `mode` is ignored — the same prop React
   * destructures away.
   */
  mode?: 'brand' | 'mono'
  /** Optional title rendered as `<title>` for hover tooltips. */
  title?: string

  /**
   * The rendered size (the default applies when a binding writes
   * `undefined` over the field default, matching React's absent-prop default).
   * @returns The pixel size.
   */
  attrSize(): number {
    return this.size ?? 20
  }

  /**
   * The accessible label (React's default when the input was never set).
   * @returns The label text.
   */
  label(): string {
    return this.ariaLabel ?? 'X (Twitter)'
  }
}

Constants

Alias of TwitterLogo — use the provider id that matches your OAuth config.

const XLogo: typeof TwitterLogo

Injection Notes

Requirements

Peer dependencies:

  • @angular/common ^22.0.0
  • @angular/core ^22.0.0
  • @angular/platform-browser ^22.0.0
  • @molecule/app-angular ^3.13.0 || ^4.0.0

Runtime Dependencies

  • @angular/common
  • @angular/core
  • @angular/platform-browser
  • @molecule/app-angular