Appearance
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:
- Brand loaded — show Collage branding only when
white_label_enabledisfalse. - 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 haswhite_label_enabled - isCollageOrigin
ComputedRef<boolean>— whether the current request origin matchesconfig.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" />Related ​
- useBrandingColors - Applies workspace primary/secondary CSS variables
- App Data Store - Source of
brand.workspace.white_label_enabled - useRouteFromMiddleware - Supplies route params including
brand_name