Home > widget-integration > FilterHelper > detectDeviceByWidth

FilterHelper.detectDeviceByWidth() method

Detects device type by width (mobile and/or tablet portrait)

Signature:

detectDeviceByWidth(mobileBreakpoint?: number, tabletBreakpoint?: number): string;

Parameters

Parameter

Type

Description

mobileBreakpoint

number

(Optional) Mobile breakpoint width (default from getBreakpointMobile())

tabletBreakpoint

number

(Optional) Tablet portrait max breakpoint width (default from getBreakpointTabletPortraitMax())

Returns:

string

Device string (e.g., 'mobile|tablet_portrait_max' or empty)