Breakpoints

A named set of screen sizes that form the basis of responsive rules in Wave.

Overview

Wave provides a set of breakpoints to maintain a consistent set of conditions when designing responsive experiences.

A breakpoint is a condition that results from a CSS media query. Media queries are used to query specific characterictics of the displaying device or environment, such as viewport width. Wave breakpoints are based on the width specific media queries.

If you need to translate em sizes to pixel sizes, multiply em value by 16

Available tokens#

Token
Value
mqSmallOnly
screen and ( max-width: 31.1875em )
mqMediumAndUp
screen and ( min-width: 31.25em )
mqMediumOnly
screen and ( min-width: 31.25em ) and ( max-width: 48.75em )
mqMediumAndBelow
screen and ( max-width: 48.6875em )
mqZeroToLarge
screen and ( min-width: 0 ) and ( max-width: 48.6875em )
mqLargeAndUp
screen and ( min-width: 48.75em )
mqLargeAndBelow
screen and ( max-width: 87.4375em )
mqXlargeAndUp
screen and ( min-width: 87.5em )

Usage#

To make responsive styling easier, breakpoints can be targeted through component props, such as responsive props on Flex or Grid components. These props accept an object as value for mobile-first responsive styles.

To find out more about how you use responsive design with layout, see Grid documentation.

You can also use these breakpoints in styled() or css by prefixing the key with @, e.g. @mqLargeAndUp to create mobile-first responsive styles. Check out the Stitches documentation to learn more.

import { styled } from '@volue/wave-react';
const Section = styled('section', {
padding: '$spacingM',
'@mqLargeAndUp': { padding: '$spacingXl' }
});
import { Box } from '@volue/wave-react';
<Box
css={{
color: '$foregroundNeutralSubtle',
'@mqMediumAndUp': { color: '$foregroundNeutral' },
'@mqXlargeAndUp': { color: '$foregroundAccentModerate' }
}}
>
Hello World
</Box>;