How storeX shares one component library across six visually distinct retail brands using nothing but CSS custom properties.

Give colours a job

Six storefronts can share a checkout while having very different personalities. Define tokens by their role, such as page background, text, accent and focus ring. A product card can then refer to the same token across a sports theme and a furniture theme without knowing the brand name.

Keep purchasing behaviour shared

Put the selected theme on the document root and let CSS custom properties inherit through the component tree. Keep quantity selection, stock validation and checkout calculations in shared components. Branching purchase logic by theme makes later bug fixes difficult to verify.

Test the difficult states

A polished homepage can hide theme problems. Check a discounted price, an unavailable size, a keyboard focus ring and a long delivery message in every theme. A single checkout fixture rendered across all six themes makes subtle contrast and spacing regressions easier to spot.