Skip to content

useCollageBranding Composable ​

File Information ​

  • Path: app/composables/core/common/useCollageBranding.ts
  • Purpose: Single source of truth for whether Collage branding (logo, loader, favicon, "Powered by Collage") should be shown vs. white-label branding
  • Type: Core Composable (Common)

Overview ​

Determines whether to display Collage's own branding elements based on two factors: whether the workspace is white-labeled, and (as a fallback when brand data hasn't loaded) whether the current origin matches the canonical Collage BASE_URL.

Two cases:

  1. Brand loaded — show Collage branding only when white_label_enabled is false.
  2. Brand not loaded (backend down or verify-domain failure) — fall back to domain check: show Collage branding only on the canonical Collage origin. On a custom white-label domain the origins differ, so Collage branding stays hidden even without brand data.

Brand routes (/:brand_name/...) whose brand failed to load always hide Collage branding, since the user is in a brand context regardless.

Return Type ​

  • showCollageBranding ComputedRef<boolean> — whether to render Collage logo, loader, favicon, and "Powered by Collage" badge
  • isWhiteLabeled ComputedRef<boolean> — whether the loaded workspace has white_label_enabled
  • isCollageOrigin ComputedRef<boolean> — whether the current request origin matches config.public.baseUrl
  • brandLoaded ComputedRef<boolean> — whether app data store has brand details loaded

Usage ​

typescript
const { showCollageBranding } = useCollageBranding()

// In template: conditionally show logo
// <CollageLogo v-if="showCollageBranding" />