Skip to content

Bundle size

Lattice is server-driven, but it still ships a React runtime that renders the component tree in the browser. This page explains what that costs and how the bundle is split — and the breakdown at the bottom is live, regenerated by Sonda on every docs build, so it always reflects the current main.

The numbers come from a bench build of the npm package: a minimal consumer entry that calls createLatticeApp() with the default registry (every built-in component), compiled as a production app build — tree-shaken and minified, exactly like your own Vite build. The package’s peer dependencies (React, React-DOM, Inertia, Echo) are external, because your app ships them whether or not it uses Lattice. What remains is Lattice’s marginal cost: its own code across @lattice-php/core, ui, form, table, and action, plus the third-party dependencies it brings along.

First-party packages are measured separately — each package page (Tree, Media, Map, Calendar, API Reference) carries its own breakdown of what that package adds on top of the framework.

Every component loads eagerly in the entry chunk, except the ones below. Each lazy-loads its heavy dependency from inside the component (React.lazy + dynamic import()), so that dependency loads only when the component renders:

  • The rich editor loads TipTap + ProseMirror.
  • The code editor loads CodeMirror.
  • The chart loads Recharts.
  • The date inputs load their zag-js date picker.
  • The i18n bootstrap loads i18next only when the backend shares the lattice.i18n prop.

The “Emitted JavaScript files” table below shows this split: the entry chunk and its few static imports are what every visitor downloads; the rest arrives on demand.

602.6 KB gzipped · 1924.3 KB raw JavaScript

DependencyRawGzipShare
@lattice-php/ui84.0 KB29.6 KB4.9%
@lattice-php/form85.1 KB29.4 KB4.9%
@lattice-php/table45.2 KB13.0 KB2.2%
@lattice-php/lattice16.1 KB6.2 KB1.0%
@lattice-php/core7.8 KB2.9 KB0.5%
@lattice-php/action3.6 KB1.5 KB0.3%
CodeMirror519.4 KB174.4 KB28.9%
TipTap + ProseMirror433.4 KB135.1 KB22.4%
recharts302.3 KB81.1 KB13.5%
zag-js date picker100.4 KB30.3 KB5.0%
Radix UI75.3 KB23.0 KB3.8%
i18next48.2 KB11.0 KB1.8%
Everything else203.4 KB65.2 KB10.8%

Emitted JavaScript files

FileRawGzip
code-block-view-DDIVg8XI.js525.9 KB177.6 KB
chart-view-BrfsURrz.js429.1 KB119.1 KB
entry-DDy_onzC.js337.8 KB105.7 KB
dist-CS567SJ9.js305.1 KB91.6 KB
rich-editor-view-Bnea5HFR.js150.7 KB50.1 KB
date-picker-view-BYp3PqJG.js106.3 KB32.3 KB
floating-ui.dom-CAffPQgl.js49.5 KB17.1 KB
page-props-DHyjGxlb.js7.3 KB3.0 KB
pattern-input-view-Cnl90PHG.js4.8 KB2.2 KB
with-selector-DjAcznnj.js2.7 KB1.2 KB
locale-ClXLzOKU.js1.7 KB0.8 KB
w3c-keyname-BOAvb0qz.js1.5 KB0.8 KB
subscriptions-DA7KY9--.js1.1 KB0.5 KB
clsx-CjueKrWZ.js0.4 KB0.3 KB
notifications-echo-DzPZYw1i.js0.3 KB0.3 KB

Open the full interactive treemap ↗ · Generated by Sonda 0.14.0 on Sat, 22 Aug 2026 17:50:34 GMT.

The breakdown above is JavaScript only. Lattice also ships a stylesheet you import into your Tailwind entry with @import "@lattice-php/lattice/css". The source file is small — theme tokens plus a few component styles — but it carries an @source directive, so your own Tailwind build scans Lattice’s components and generates the utility classes they use. The compiled CSS lands in the tens of kilobytes raw — a handful gzipped — and its real cost depends on which components you actually render and your own Tailwind configuration.