Once UI provides a type-safe responsive breakpoint system where each component only exposes the props it actually supports at each breakpoint.
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).
Breakpoints cascade downward: xl → l → m → s → xs. A value set at xl applies to all smaller breakpoints unless overridden.
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.
Supports layout, spacing, sizing, colors, typography, and effects.
Supported breakpoint props:
Supports grid-specific, spacing, sizing, colors, typography, and effects. Does not support direction, horizontal, vertical, center, wrap, flex.
Supported breakpoint props:
These extend Flex and inherit all Flex breakpoint props.
The generic BreakpointProps<Source, Keys> type picks specific keys from a source interface and makes them optional:
Each component defines its allowed props:
-
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.
-
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.
-
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.
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.
Exported types for extending the breakpoint system: