Using StreamLayer UI Context

Access StreamLayer UI state flags via the useStreamLayerUI React hook to control component visibility in your application.

Overview

The useStreamLayerUI hook provides access to boolean flags for StreamLayer UI components. Use these flags to control the visibility of UI elements in your application.

Available Flags

promotionExternalAd?: boolean
promotionSidebar?: boolean
promotionSideBySide?: boolean
promotionOverlay?: boolean
promotionNotification?: boolean
promotionBanner?: boolean
promotionViewed?: boolean
app?: boolean
appSidebar?: boolean
appNotification?: boolean
appBanner?: boolean
onboardingNotification?: boolean
exposedPauseAd?: boolean
ssaiAdBreak?: boolean // TV platforms only
polymarket?: boolean
responsiveLayout?: 'mobile' | 'desktop'

Usage

import { useStreamLayerUI } from '@streamlayer/react'

Related