2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Basics

Breakpoints

Updated: July 27, 2026
View on GitHub
Once UI provides a type-safe responsive breakpoint system where each component only exposes the props it actually supports at each breakpoint. Breakpoints are managed by the LayoutProvider component. You can override default breakpoints by passing a breakpoints prop to the LayoutProvider.
Breakpoint
Min Width
Typical Device
xs480pxMobile portrait
s768pxMobile landscape / Tablet portrait
m1024pxTablet landscape / Small laptop
l1440pxDesktop
xl1920pxLarge desktop
Breakpoints cascade downward: xllmsxs. 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:
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
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
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:
  • Default breakpoints (server-rendered): When using the default breakpoint system, ServerFlex/ServerGrid generate CSS classes at build time (e.g., m-padding-l, s-flex-column).
  • Custom breakpoints (client-rendered): When using custom breakpoints via LayoutProvider, ClientFlex/ClientGrid apply responsive styles client-side using useResponsiveClasses for CSS classes and applyResponsiveStyles for inline styles.
  • Cascade order: xllmsxs. Larger breakpoints flow down to smaller ones. Setting xl={{ padding: "32" }} applies padding: 32 at all sizes unless a smaller breakpoint overrides it.
To use non-default breakpoints, wrap your app in a LayoutProvider: With custom breakpoints, responsive styles are applied client-side via JavaScript rather than server-rendered CSS classes. Exported types for extending the breakpoint system:
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
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club