Once UI Blog
Builder stories
Posts
Once UI
Once UI Stack chat: an AI chat with a face
Once UI 2.5: reactions that move
Once UI 2.4: ready for AI apps
Once UI 3.0 beta: one way to say it
Stack languages: your app in Hungarian, or in two
Stack store: your shop on your own site
Liquid Metal: chrome that never sets
Chirio, redesigned
Styled screenshots in Chirio
Once UI 2.3: made for real apps
Frametic is now a video and capture studio
Agents write about 40% less code from Stack
Magic Portfolio, now on Once UI 2
Frametic MCP: let your agent film your site
Once UI Stack: your site as a desktop app
Once UI Stack, redesigned
Stack: teams and billing
Prism Glow: soft prism light behind your sign-in screen
Once UI for React Native: the same props on a phone
Once UI 2.2: chat, forms and mobile
Dither: your own image or video as a dithered print
Once UI 2.1: The pieces apps kept asking for
Once UI 2.0: A system an AI can build with
What made Once UI 2.0 possible
Once UI 2.0 alpha: Measured, not assumed
Colour arrives in pairs
Once UI 1.8: Polish as a feature
Once UI 1.7: Form with Intent
From products to systems: a new service model
Magic Journal: A different medium for long-form writing
Supa Social: The next milestone of our journey
Once UI is open source. Here's how we plan to keep it that way.
Designing a timeless, AI-native brand
Once UI 1.5: Curiosity in code
Once UI 1.4 migration guide: The breakpoint object
Launching in the AI-native era: A guide for indie builders
The first design system for indie builders
Builder Stories
Side and Once UI: From café website to reservation system
SatisPro and Once UI: Scaling smarter review management
IQON and Once UI: Scaling with a design system
Dev: Blending science and code with Once UI
JExcellence and Once UI: Turning experiments into enterprise apps
OsmyReal: Launching a platform for mobile gaming with minimal coding
TrademarkTrademark
Ctrl k
Search…
Sign up
Once UI Blog
Builder stories
Posts
Once UI
Once UI Stack chat: an AI chat with a face
Once UI 2.5: reactions that move
Once UI 2.4: ready for AI apps
Once UI 3.0 beta: one way to say it
Stack languages: your app in Hungarian, or in two
Stack store: your shop on your own site
Liquid Metal: chrome that never sets
Chirio, redesigned
Styled screenshots in Chirio
Once UI 2.3: made for real apps
Frametic is now a video and capture studio
Agents write about 40% less code from Stack
Magic Portfolio, now on Once UI 2
Frametic MCP: let your agent film your site
Once UI Stack: your site as a desktop app
Once UI Stack, redesigned
Stack: teams and billing
Prism Glow: soft prism light behind your sign-in screen
Once UI for React Native: the same props on a phone
Once UI 2.2: chat, forms and mobile
Dither: your own image or video as a dithered print
Once UI 2.1: The pieces apps kept asking for
Once UI 2.0: A system an AI can build with
What made Once UI 2.0 possible
Once UI 2.0 alpha: Measured, not assumed
Colour arrives in pairs
Once UI 1.8: Polish as a feature
Once UI 1.7: Form with Intent
From products to systems: a new service model
Magic Journal: A different medium for long-form writing
Supa Social: The next milestone of our journey
Once UI is open source. Here's how we plan to keep it that way.
Designing a timeless, AI-native brand
Once UI 1.5: Curiosity in code
Once UI 1.4 migration guide: The breakpoint object
Launching in the AI-native era: A guide for indie builders
The first design system for indie builders
Builder Stories
Side and Once UI: From café website to reservation system
SatisPro and Once UI: Scaling smarter review management
IQON and Once UI: Scaling with a design system
Dev: Blending science and code with Once UI
JExcellence and Once UI: Turning experiments into enterprise apps
OsmyReal: Launching a platform for mobile gaming with minimal coding

Once UI 1.4 migration guide: The breakpoint object

Upgrade your app to Once UI 1.4 in 5 minutes.
Updated 7 days ago
Once UI 1.5: Curiosity in code
Launching in the AI-native era: A guide for indie builders
Sponsored
Aveiro
aveiro.app
Sponsored
Aveiro
aveiro.app
TrademarkTrademark
Once UIDocumentationBlog
© Once UI. All rights reserved.
Built with Aveiro
Once UI 1.4 is here with new components, improved component APIs and long-awaited features. Here's what you need to do to upgrade your project.

The LayoutProvider Context

This context is required for the updated Flex and Grid components. Wrap your app's children with the LayoutProvider component in your layout.tsx or Providers.tsx. It lets you override the default breakpoints, but be aware that the overrides only affect runtime logic (layout shifts) and not utility classes (position, styling, etc.). Use the override feature with caution, since it's still a beta feature.

The Breakpoint Object

One of the most important features of the new release is the breakpoint object of the Flex and Grid components that replaces tabletDirection, mobileDirection, tabletColumns, mobileColumns, hide and show props, and provides additional functionalities for overriding default styles at different breakpoints. Let's see them in action through a few examples!
The new, object-based approach supports for an additional xs (480px by default) and l (1440px by default) range with xl standing for everything above 1440px. The property adds a utility class at page load to prevent layout shifts, and then removes the element from the DOM to optimize performance. Legacy syntax: New syntax:
There's only a single, hide prop for managing visibility at different breakpoints. It works similar to the max-width CSS breakpoint property, meaning that the declaration affects all smaller breakpoint too, if not specified otherwise. Legacy syntax: New syntax:
Grid columns can also be overriden with the new breakpoint object. Legacy syntax: New syntax:

New features

You can override most display props with the new breakpoint object. Here's a list of what's currently supported: direction, horizontal, vertical and position. Also notice how top is not set in the above example, since it will default to 0 if not specified when using sticky position. You can set inline styles for different breakpoints, which will be resolved at runtime with a very short delay. It works well for smaller adjustments, especially when the element is hidden at a specific breakpoint, like a mobile menu. We split the Flex and Grid components into client and server counterparts, so whenever you use them, they will automatically detect if client functionality is needed and only render with the use client directive when it's actually needed.

Simplified Alignment

The horizontal and vertical alignment values for the Flex are now accessible with the following shortened syntax:
Legacy
New
`space-between``between`
`space-around``around`
`space-evenly``even`
The new properties are shorter and are more consistent with the existing start and end values.

Migration

Using batch find and replace is generally safe for these updates.
Legacy
New
`tabletDirection="column"``m={{direction:"column"}}`
`mobileDirection="column"``s={{direction:"column"}}`
`tabletDirection="row"``m={{direction:"row"}}`
`mobileDirection="row"``s={{direction:"row"}}`
Legacy
New
`tabletColumns={1}``m={{columns: 1}}`
`tabletColumns={2}``m={{columns: 2}}`
......
`tabletColumns={12}``m={{columns: 12}}`
`mobileColumns={1}``s={{columns: 1}}`
`mobileColumns={2}``s={{columns: 2}}`
`mobileColumns={12}``s={{columns: 12}}`
Legacy
New
`hide="m"``m={{hide: true}}`
`hide="s"``s={{hide: true}}`
`show="m"``hide m={{hide: false}}`
`show="s"``hide s={{hide: false}}`
Legacy
New
`horizontal="space-between"``horizontal="between"`
`horizontal="space-around"``horizontal="around"`
`horizontal="space-evenly"``horizontal="even"`
`vertical="space-between"``vertical="between"`
`vertical="space-around"``vertical="around"`
`vertical="space-evenly"``vertical="even"`

Further updates

We made numerous accessibility improvements: reworked DatePicker, added a custom cursor property to Flex and Grid that supports reactNode, introduced ProgressBar and a lot more! Read the official docs.
<Row fillWidth tabletDirection="column">
  {children}
</Row>
<Row fillWidth m={{direction: "column"}}>
  {children}
</Row>
<Column show="m">
  {children}
</Column>
<Column hide m={{hide: false}}>
  {children}
</Column>
<Grid columns={8} tabletColumns={4} mobileColumns={2}>
  {children}
</Grid>
<Grid columns={8} m={{columns: 4}} s={{columns: 2}}>
  {children}
</Grid>
<Column position="sticky" m={{position: "absolute"}}>
  {children}
</Column>
<Column position="sticky" m={{position: "absolute", style: {top: "24"}}}>
  {children}
</Column>