Get the current breakpoint
webflow.getMediaQuery()
Retrieves the current breakpoint setting in the Designer. Webflow’s built-in responsive breakpoints - also known as media queries - allow users to customize site designs for different screen sizes. Knowing the current breakpoint can help your app build responsive content that’s applicable to different screen sizes and contexts.
This method returns only the breakpoint the user is currently viewing. To get every breakpoint configured for the site — along with each one’s name, width range, and which is the base breakpoint — use webflow.getAllMediaQueries().
Syntax
Returns
Promise<BreakpointID >:"xxl" | "xl" | "large" | "main" | "medium" | "small" | "tiny" - Identifier for the breakpoint size, also known as media query, in the designer.
A Promise that resolves to the value of the Breakpoint ID.