Skip to content

Performance

Every component has a budget

Motion should never be the reason a page is slow. These are the limits, and the bench or CI checks each one on every change.

Size of the shared runtime

Every component depends on one small runtime package. Its size is checked with size-limit on every build:

EntryBudgetMeasuredResult
@frictionborn/runtime (core)≤ 5.0 KB gzip4.10 KB gzipwithin budget
@frictionborn/runtime/gl≤ 3.0 KB gzip1.46 KB gzipwithin budget
@frictionborn/runtime/canvas≤ 3.5 KB gzip3.38 KB gzipwithin budget

WebGL contexts are leased

Browsers drop WebGL canvases when a page holds too many contexts, so the runtime hands them out on loan:

  • Desktop (fine pointer): at most 4 contexts per page.
  • Phones (coarse pointer): at most 2 contexts per page.
  • Images that react on hover: DistortionImage takes a context only while hovered or focused and gives it back when the pointer leaves.

Nothing runs when nothing is visible

  • Off screen: a component that scrolls out of view leaves the frame loop. Frames measured: 0.
  • Hidden tab: when the tab is hidden, every component stops stepping. Frames measured: 0.
  • While running: the main thread stays idle more than 90 % of the time, so input stays responsive.

No layout shift

Reveals and canvases are classic causes of layout shift. Here the server HTML and the posters take exactly the room the finished component takes, before any JavaScript runs. Every component has a recorded layout shift of 0.01 or less on the bench; each spec sheet shows its own value.

What next

Open any component to see its measured numbers, or read how the components handle accessibility and reduced motion.