Skip to main content

Branding & Layout

All branding, layout, and UI configuration is fetched as part of the remote SDK config during initialization. These values are cached in context and accessible synchronously through dedicated hooks — no additional API calls needed.

Quick Reference

HookReturnsSource
useBranding()Colors, fonts, logosconfig.branding
useFeatureFlags()Binary feature togglesconfig.featureFlags
useBanners()Carousel bannersconfig.banners
usePopups()Popup/overlay definitionsconfig.activePopups
useAnnouncements()Announcement bar messagesconfig.activeAnnouncements

How It Works

When StackfrontProvider mounts, the ConfigService fetches a single SdkConfigResponse containing all UI configuration. This is stored in context and the hooks above simply read from it:
// useBranding() is equivalent to:
const { config } = useStackfront();
return config?.branding ?? null;