React Glass UI Performance
React glass UI performance in SheenUI is a set of enforced budgets: at most 8 blurred surfaces in view, 3 refracting ones, a JavaScript limit per route, loops that pause off-screen and full reduced-motion support, with lab numbers and their limits.
What is enforced
These are rules the docs site is built against, and a failing check stops a release. A budget that cannot be met says so in the tables below instead of being quietly loosened.
- Blurred surfaces. At most 8 elements with a
backdrop-filterare in view at once, checked at every scroll position of key pages in a real browser. Glass nested inside glass draws no blur of its own, and while a dialog is open the page behind it stops blurring. - Refraction. The Liquid Glass lens refracts on at most 3 surfaces page-wide; the rest fall back to frosted blur until a slot frees up.
- Motion. Only
transformandopacityanimate, apart from a short listed set of exceptions. An ancestor of glass never gets an opacity below 1, a filter, a mask or a clip-path, because that flattens the glass inside it. - Loops sleep. Marquees, beams, ambient backdrops, looping CSS animations and live charts pause when they scroll off-screen and when the tab is hidden, then resume.
- Reduced motion. The OS setting and the in-app switch both calm every loop and pointer effect. Exits are shorter than entrances and never overshoot.
- Interaction. A browser test drives real interactions on a fixed set of routes in both looks and fails on a long task over 50 ms or any layout shift. Scrolling a page from top to bottom may add at most 0.01 of layout shift.
- JavaScript per route.
pnpm budgetmeasures the gzip size of the scripts a route needs before it can hydrate, and of everything it fetches in the first seconds after load. A route over its class budget fails the check.
Initial JS is what the browser downloads before the page can hydrate. Lazy parts such as charts and demos load afterwards, so the second pair of columns counts every script requested in the first 5 seconds after load. The floor is the shared docs shell, about 132 KB, plus roughly 100 KB it fetches when idle.
Lab measurements
Method. Measured 25 Nov 2026 on the deployed site, the production build users get, not a local build (the Data table row is the one exception, described under the table). Machine: a Linux desktop (Ubuntu 24.04, AMD Ryzen 9 9950X, 32 threads, 60 GB RAM; load average 1.1 to 3.7 during the runs, none above 4) running Chromium 159.0.8154.6 (Playwright build, headless), against the deployed site at lokendra-builds.github.io/sheenui, which GitHub Pages serves through its CDN with gzip or brotli compression. Page loads: CPU slowed 4x (Emulation.setCPUThrottlingRate 4) and a slow-4G network (Network.emulateNetworkConditions: 150 ms latency, 1638.4 kbit/s down, 750 kbit/s up) on a 390 by 844 px phone viewport at 3x pixel ratio, a new browser context for every load. Each figure is the median of 5 cold loads. LCP is the last largest-contentful-paint entry. CLS counts layout shifts without recent input up to 5 seconds after the load event. Total Blocking Time is the time over 50 ms of each long task that ends after First Contentful Paint, up to 5 seconds after load. JavaScript bytes are the encoded response sizes of every script, before the load event and by 5 seconds after it. The Lighthouse table is a separate run of Lighthouse 13.6.0, mobile preset with simulated throttling (4x CPU, 150 ms round trip, 1638.4 kbit/s), median of 3, on the site’s default look. This is a laboratory profile run on a desktop machine, not a phone.
The Data table row is the exception. It was re-measured on 26 Nov 2026 on a local production build of the current source, served from localhost on the same machine with the same throttling and the same method (median of 5 cold loads, run alone), not on the deployed site. A local build of the source before that fix, measured the same way, gave a median longest task of 194 ms and 144 ms of Total Blocking Time. The row first published for the deployed site (25 Nov 2026) said 83 ms and 33 ms; why a local load shows a longer task than the deployed one is not explained, so do not compare that row with the others.
Interactions were measured on a 1440 by 900 px viewport with the 4x CPU slowdown and no network throttling, after the page had loaded and the demo had hydrated. The JavaScript columns are transferred (compressed) sizes including headers, so they differ a little from the gzip figures in the budget table.
Honest limits
- Long tasks over 50 ms remain on the throttled phone profile: all 9 measured routes still show one, with the median longest task between 59 and 163 ms and the worst single load at 187 ms (the data table, on a local build). The data table, the chat thread and the two dashboards are over 100 ms. They were reduced, not removed.
- Real refraction runs in Chromium only. Safari and Firefox accept the filter but draw nothing, so they get the frosted blur instead.
- There is no field data yet: every number above is a lab run, with one machine and one network profile.
- The guide page scores 94 in Lighthouse, because its simulated Largest Contentful Paint is about 2.9 s, over the 2.5 s target. Lighthouse is a simulation and the machine was not otherwise idle (load average up to 3.7), so treat differences of a few points as noise. The budget table was measured on the 25 Nov 2026 build with
pnpm budget, not on the deployed site. Run your own build withpnpm budgetand the browser’s own tools before relying on any of this.
Keep your own page fast with glass
- Count the blur. Keep at most 8 blurred surfaces in view, and 3 of them refracting. Use
glass-1for small controls, since it never blurs, and do not stack glass in glass. The backdrop-filter performance guide explains why each surface costs a render pass. - Offer Lite glass. It lowers the blur radius for slow devices. SheenUI applies it automatically on weak hardware and the visitor can switch it from the preferences bar (see Foundations).
- Animate transform and opacity only. Do not fade, filter, mask or clip a wrapper that holds glass: animate the glass element itself.
- Let loops sleep. The Marquee, Particles and Liquid Glass effects already pause off-screen and in hidden tabs; do the same for any loop of your own.
- Import only what you use. Components are copied as source, so a page pays only for the files it imports (see Installation).
Frequently asked questions
Related pages
By Lokendra Singh Rathore (GitHub, opens in a new tab). Published .