Skip to content
TrademarkTrademark
Docs
Basics

Breakpoints

Updated: October 10, 2026
View on GitHub

Responsive Breakpoints

Once UI provides a type-safe responsive breakpoint system where each component only exposes the props it actually supports at each breakpoint.

Breakpoint values

The breakpoints are fixed, and each one applies at its width and below. xl is the base state above all of them, not a media query. LayoutProvider reports the current one through useLayout; it no longer takes a breakpoints prop (removed in 2.0, see the migration guide).

Breakpoint
Applies at
Typical Device
xs≤ 480pxMobile portrait
s≤ 768pxMobile landscape / Tablet portrait
m≤ 1024pxTablet landscape / Small laptop
l≤ 1440pxDesktop
xlabove 1440pxLarge desktop (the base)

Breakpoints cascade downward: xl → l → m → s → xs. A value set at xl applies to all smaller breakpoints unless overridden.

Per-component props

Each component defines its own breakpoint type using BreakpointProps<Source, Keys>, a generic that picks specific keys from the component's prop interfaces and makes them optional.

Flex / Row / Column

Supports layout, spacing, sizing, colors, typography, and effects.

Supported breakpoint props:

Category
Props
Layoutdirection, horizontal, vertical, center, wrap, flex
Spacingpadding, paddingLeft, paddingRight, paddingTop, paddingBottom, paddingX, paddingY, margin, marginLeft, marginRight, marginTop, marginBottom, marginX, marginY, gap
Positiontop, right, bottom, left, position, hide
Sizingwidth, height, maxWidth, minWidth, minHeight, maxHeight, fit, fitWidth, fitHeight, fill, fillWidth, fillHeight, aspectRatio
Colorsbackground, solid, border, borderTop, borderRight, borderBottom, borderLeft, borderX, borderY, borderStyle, borderWidth, radius, shadow, onBackground, onSolid
Typographyalign, textVariant, textSize, textWeight, textType
Effectsopacity, zIndex, pointerEvents, transition, scrollbar, dark, light
Displayoverflow, overflowX, overflowY
Escape hatchstyle

Grid

Supports grid-specific, spacing, sizing, colors, typography, and effects. Does not support direction, horizontal, vertical, center, wrap, flex.

Supported breakpoint props:

Category
Props
Grid-specificcolumns, rows
Spacingpadding, paddingLeft, paddingRight, paddingTop, paddingBottom, paddingX, paddingY, margin, marginLeft, marginRight, marginTop, marginBottom, marginX, marginY, gap
Positiontop, right, bottom, left, position, hide
Sizingwidth, height, maxWidth, minWidth, minHeight, maxHeight, fit, fitWidth, fitHeight, fill, fillWidth, fillHeight, aspectRatio
Colorsbackground, solid, border, borderTop, borderRight, borderBottom, borderLeft, borderX, borderY, borderStyle, borderWidth, radius, shadow, onBackground, onSolid
Typographyalign, textVariant, textSize, textWeight, textType
Effectsopacity, zIndex, pointerEvents, transition, scrollbar, dark, light
Displayoverflow, overflowX, overflowY
Escape hatchstyle

Card / Dialog / Mask

These extend Flex and inherit all Flex breakpoint props.

How it works

Type system

The generic BreakpointProps<Source, Keys> type picks specific keys from a source interface and makes them optional:

Each component defines its allowed props:

Runtime behavior

  1. Values with a class (server-rendered): a breakpoint value that maps to a utility class — a spacing token, a direction, an alignment — renders as that class on the server (e.g. m-padding-l, s-flex-column), so the layout is right in the first paint.

  2. Values without a class (client-rendered): width, height and their min/max siblings, aspectRatio, style, and spacing given as a number (rem) have no class behind them. An element that sets one of these at a breakpoint renders through ClientFlex/ClientGrid, which applies it as an inline style after hydration, for the breakpoint LayoutProvider reports. Prefer tokens where you can.

  3. Cascade order: xl → l → m → s → xs. Larger breakpoints flow down to smaller ones. Setting xl={{ padding: "32" }} applies padding: 32 at all sizes unless a smaller breakpoint overrides it.

Examples

Hide on mobile

Direction change

Custom breakpoints

Breakpoints are not configurable since 2.0: the utility classes carry the widths inside their @media queries, and a prebuilt stylesheet cannot follow a width an app picks at runtime. If you need a different width for one layout, write a media query in a CSS module for it.

TypeScript API

Exported types for extending the breakpoint system:

Available breakpoint types

Type
Use Case
BreakpointProps<Source, Keys>Generic: pick any keys from any source
FlexBreakpointPropsFlex, Row, Column, Card, Dialog, Mask, etc.
GridBreakpointPropsGrid, LogoCloud
TextBreakpointPropsText (if breakpoints added)
ButtonBreakpointPropsButton (if breakpoints added)
InputBreakpointPropsInput (if breakpoints added)
Edit this page on GitHub