Skip to content
Shahariar Niloy, home

A lighter design system

At work, I built our booking platform's design system from scratch: a drop-in replacement for the component library we used before, with the same APIs and about half the JavaScript.

Type
Company project
Role
Designed and built it
Stack
React, TypeScript, Tailwind CSS
Scope
60+ components

By the numbers

60+components, all production-ready
~½the JavaScript of the library it replaced
~6×smaller, for a typical component
~⅓the size of the shared base code

Where it matters most

  • Data table−91%
  • Time picker−84%
  • Date picker−77%
  • List−87%
  • Pagination−86%
  • Dropdown−85%
  • Select−81%
  • Button−75%

Download size of each component, compared with its closest equivalent before.

Why build one

On a booking site, bundle size is conversion: every kilobyte the browser has to download and run delays the search box someone is waiting to use. The library we used carried a styling runtime and far more code than the platform needed.

So the goal was simple: keep everything the team relies on — the same props, hover, focus, keyboard behaviour and density — and drop everything else. Moving a screen over is mostly an import swap.

Principles

Same API, almost no dependenciesBehaves like the library it replaces, but leans only on a few small helpers.
Accessibility firstWCAG AA as the baseline, standard ARIA patterns, full keyboard support and managed focus. If it isn't accessible, it isn't done.
Performance is conversionTree-shakeable, heavy parts loaded only when needed, and safe to render on the server.
Headless firstComplex widgets keep their logic in hooks, with styles layered on top, so they can be reskinned without forking.
Tokens, never raw valuesEvery colour, space, shadow and motion value comes from tokens, with paired light and dark modes.
Built for travel at scaleRight-to-left text, long translations and dense data are handled from the start.

Motion with manners

How it’s measured

Each component is bundled on its own — minified, tree-shaken and compressed — and compared with its closest equivalent in the previous library, measured the same way. Framework code is left out, since the app ships it either way.

Next highlightOnly the words a page needs