Skip to content

Lazy mounting

Mount tab content only on first focus, with a placeholder.

lazy

With lazy, a tab’s content isn’t created until you first visit it — cheaper startup for screens with many or heavy tabs. Jumping to a far tab mounts only that destination, not every tab along the way (and onTabChange fires once, for the settled destination).

<Tabs.Container lazy renderLazyPlaceholder={() => <Spinner />}>
  {tabs}
</Tabs.Container>

Note · lazy defers the first mount, but a visited tab then stays mounted for the session. To cap memory across many tabs, combine it with windowConfig.

Reference

lazy boolean

Mount tab content on first focus. Swiping pre-mounts the neighbor; tapping a far tab mounts only the destination — never the tabs in between. Default false.

renderLazyPlaceholder ({ name, index }) => ReactNode

Shown for unmounted lazy tabs. Default null.