Runtime responsive helpers exposed through designer.util.responsive.

interface AsukaResponsiveApi {
    getBreakpoint: (() => AsukaResponsiveBreakpoint);
    getConfig: (() => NormalizedAsukaResponsiveConfig);
    getWidth: (() => number);
    isDesktop: (() => boolean);
    isMobile: (() => boolean);
    isTablet: (() => boolean);
    setConfig: ((config: undefined | null | AsukaResponsiveConfig) => NormalizedAsukaResponsiveConfig);
}

Properties

getBreakpoint: (() => AsukaResponsiveBreakpoint)

Return the current responsive breakpoint.

Return the normalized responsive config.

getWidth: (() => number)

Return the latest measured shell width in pixels.

isDesktop: (() => boolean)

Return whether the current shell width is desktop.

isMobile: (() => boolean)

Return whether the current shell width is mobile.

isTablet: (() => boolean)

Return whether the current shell width is tablet.

setConfig: ((config: undefined | null | AsukaResponsiveConfig) => NormalizedAsukaResponsiveConfig)

Merge and apply a responsive config patch at runtime.