Performance
Speed is a feature. Performance is the foundation of user trust. Latency kills flow.
Measure reliably
You can't fix what you can't measure. Guesswork leads to optimisation of the wrong things.
Test on real conditions
Development machines lie. A fast laptop on fibre hides the problems your users face.
Do
Don’t
Core Web Vitals
Three metrics that define real-world user experience. Target green on all three.
No layout shift (CLS)
Stability is quality. Things should not jump around as they load.
Do
Don’t
Fast first paint (LCP)
Prioritise the viewport. Bandwidth should be spent on what is seen immediately.
<!-- Preload above-the-fold images --><link rel="preload" href="/hero.jpg" as="image" /><!-- Lazy-load everything else --><img src="footer.jpg" loading="lazy" alt="..." />
Do
Don’t
For Oztix-hosted imagery the Image component handles all of this: explicit dimensions to prevent CLS, a right-sized WebP srcSet to cut bytes, lazy-by-default loading with priority for the LCP image, and defer for off-screen carousel slides.
Responsive to input (INP)
The main thread is for UI. Heavy logic belongs elsewhere.
Do
requestIdleCallback or scheduler.yield().Don’t
Rendering
Reactivity has a cost. The DOM is slow. Minimise the work the browser has to do.
Track re-renders
Unnecessary renders burn battery and block interaction.
Do
Don’t
Minimise layout work
Reading and writing layout properties triggers expensive reflows.
Do
transform and opacity (compositor-only properties) instead of width, height, or top.Don’t
Virtualise large lists
DOM nodes are heavy. Don't render what the user can't see.
/* Use virtualisation or CSS containment */<VirtualList items={items} />/* Or use CSS containment for simpler cases */.offscreen { content-visibility: auto; }
Do
virtua) or content-visibility: auto for long lists and large tables.Don’t
Network
Latency kills flow. API interactions should feel instantaneous.
Network budgets
Set expectations for how fast things should be.
Do
Don’t
Preconnect to origins
Handshakes take time. Establish connections before you need the data.
<link rel="preconnect" href="https://cdn.oztix.com.au" /><link rel="dns-prefetch" href="https://api.oztix.com.au" />
Do
<link rel="preconnect"> for critical CDNs or API domains.Don’t
Fonts
Typography should not block reading. Text must appear fast. See Typography for the full type system.
Optimise font loading
Custom fonts are a luxury the user pays for with load time.
Do
unicode-range). Use font-display: swap so text is visible immediately.Don’t
What Roadie handles
The design system already takes care of several performance concerns. You get these for free.
Fluid typography
Sizes text-lg and above use clamp() for fluid scaling. No manual breakpoint overrides needed.
CSS-only utilities
Intent, emphasis, and interaction utilities are pure CSS. No JavaScript runtime cost for styling.
Tree-shakeable components
Components are built with tsdown in unbundle mode — every leaf compiles to its own dist file, so subpath imports only drag in what you use.
Reduced motion
A global prefers-reduced-motion reset neutralises all transitions and animations automatically.
Quick reference
How performance rules map to existing foundation pages.
| Rule | Foundation | What it covers |
|---|---|---|
| No CLS | Layout | Grid defaults, explicit sizing, gap over margin |
| Font optimisation | Typography | Fluid scaling, font families, preloading |
| Compositor animations | Motion | Transform and opacity transitions, motion tokens |
| Reduced motion | Motion | Global prefers-reduced-motion reset |
| Optimistic UI | Interactions | Loading states, feedback patterns |