Get all media queries

webflow.getAllMediaQueries()

Retrieves all media queries (breakpoints) configured for the current site. Webflow’s responsive breakpoints let users customize site designs for different screen sizes. Use this method to discover which breakpoints a site supports and their width ranges, so your app can build responsive content that applies across screen sizes.

Sites start with four breakpoints (main, medium, small, and tiny). Users can add up to three more (large, xl, and xxl) in the Designer, for a maximum of seven.

This method returns every breakpoint configured for the site, along with each one’s dimensions. To get the single breakpoint the user is currently viewing in the Designer, use webflow.getMediaQuery(). You can match its returned BreakpointId against the id field here to look up the active breakpoint’s full details.

Syntax

1webflow.getAllMediaQueries(): Promise<MediaQuery[]>

Returns

A Promise that resolves to an array of MediaQuery objects, one for each breakpoint configured on the current site. Each object has the following properties:

PropertyTypeDescription
idBreakpointIdIdentifier for the breakpoint: "xxl" | "xl" | "large" | "main" | "medium" | "small" | "tiny".
namestringUser-facing label for the breakpoint, for example "Desktop", "Tablet", or "Mobile".
minWidthnumber | nullMinimum width in pixels the breakpoint applies to, or null when unbounded below.
maxWidthnumber | nullMaximum width in pixels the breakpoint applies to, or null when unbounded above.
isBasebooleanWhether the breakpoint is the site’s base breakpoint, which all other breakpoints inherit from. Today this is main.

The array is ordered by cascade specificity — the same order Webflow applies styles. The base breakpoint (main) comes first, followed by ascending min-width breakpoints (large, xl, xxl), then descending max-width breakpoints (medium, small, tiny). This is not a strict sort by viewport width.

Example

1const mediaQueries = await webflow.getAllMediaQueries();
2
3mediaQueries.forEach((mediaQuery) => {
4 console.log("ID:", mediaQuery.id);
5 console.log("Name:", mediaQuery.name);
6 console.log("Min width:", mediaQuery.minWidth);
7 console.log("Max width:", mediaQuery.maxWidth);
8 console.log("Is base breakpoint:", mediaQuery.isBase);
9});