Ecommerce design system: How to build one for your store

Contents
An ecommerce design system is a shared set of design tokens, coded components and usage rules for shopping flows, so listing, product page, cart, checkout and account behave the same everywhere. It pays off once more than one team, channel or brand variant ships UI; a single team on one theme is usually better served by a UI kit.
The build runs in a fixed order: audit the live store, define tokens, specify the commerce components, connect Figma to Storybook, and check checkout against WCAG 2.2. How much of it you need depends on team count and channels.
What is an ecommerce design system?
It has three layers. Design tokens define color, type, and spacing. Coded components, documented in Storybook, turn those tokens into a product card that handles its sale, out-of-stock, and loading states the same way on every page. Usage rules say which component to use where and who may change it.
The design work behind it is part of UX and UI design, but the system only holds when design and code change together. We'd suggest a full system once drift between teams starts costing review time.
Does your store need a design system or is a UI kit enough?
A UI kit is enough for one team shipping one channel in one theme; an ecommerce design system pays off at two or more teams, channels, or brand variants. That threshold is our judgment, not a measured benchmark.
A UI kit is a Figma library of styled components. It has no coded counterpart, no versioning, and no rule for what a product card does when an item is out of stock.
A design system adds design tokens, coded components, and usage rules, so design and code change together.
The trade-offs side by side:
| Situation | UI kit | Design system |
|---|---|---|
| Teams shipping storefront UI | One | Two or more |
| Channels | One web storefront | Web plus app, marketplace, or kiosk |
| Brand variants or themes | One | Several, driven by token modes |
| Frontend | Single theme | Headless storefront with multiple frontends |
On a headless storefront with two frontends, a UI kit produces two independent implementations of the same product card. They drift within a few releases. A shared component library fed by Figma variables exported as design tokens keeps both in step.
Skip the system when a single developer maintains a hosted theme, or when the product's visual direction changes every quarter. A system needs an owner and a release process, and without them it decays into an outdated UI kit with extra overhead.
Silk, Netguru's free design system for commerce, fits between the two. It is more structured than a basic UI kit and lighter than an enterprise system, which suits single-brand stores and B2B products that iterate quickly.
How do you audit your store's interface before building?
An interface inventory of the live store means screenshotting every template and logging each component instance by type and state, which gives you a count of duplicates and missing states before you define a single design token.
Work in this order:
- Screenshot every template at mobile and desktop widths: home, category listing, search results, product page, cart, each checkout step, account, and order confirmation.
- Force the states. Use test products to trigger sale price, low stock, out of stock, backorder, and very long titles. Throttle the network to catch loading states, and submit bad input to see form errors.
- Log one row per instance in a spreadsheet or FigJam board, with columns for template, component, state, breakpoint, source class or component name, and screenshot link.
- Pull computed values from the live CSS (colors, font sizes, spacing, radii) and count the distinct values per property. A dozen near-identical grays is a list of candidates to collapse into one semantic token.
- Tally duplicates and gaps. Count button styles and price formats ("$19", "$19.00", "19 USD", three different sale-price treatments). Then build a grid of component by state, where every empty cell is a missing state.
A product card that appears on the category page, in search results, and in a recommendations carousel gets three rows. The differences between those rows are your duplicate count, and the blank cells under "out of stock" or "loading" are the first states to design.
Rank the findings by position on the revenue path. Checkout and product page inconsistencies come before footer and blog styles.
The audit changes shape when the platform hosts checkout. If you can only restyle part of it, log those screens as constrained so the system does not promise components you cannot ship there.
Which design tokens does an ecommerce store need?
An ecommerce store needs design tokens for color, typography, spacing, and layout, plus a small set of commerce-specific semantic tokens for price, stock status, and badges. Those three extras are where stores most often hard-code values. Whatever you name them, follow clear design token naming conventions so the commerce-specific tokens stay consistent across the codebase.
- Color: brand primitives, surface and text roles, feedback states, and semantic tokens for sale price, original price, and low-stock warnings.
- Typography: font families, a size scale, line heights, and a tabular-numerals setting so prices align in listings and cart lines.
- Spacing: one base scale (4px or 8px steps) shared by cards, form fields, and cart rows.
- Layout: breakpoints, container widths, product-grid gutters and column counts, and an aspect-ratio token for product images.
Take the sale-price color. A primitive holds a raw palette value, a semantic token gives it a role, and a component token binds that role to one element. In the example below, the hex value is an assumed one.
{
"color": {
"red": {
"600": { "$value": "#B3261E", "$type": "color" }
},
"price": {
"sale": { "$value": "{color.red.600}" }
}
},
"price": {
"sale": {
"text": { "$value": "{color.price.sale}" }
}
}
}
Style Dictionary reads this Design Tokens Community Group format and emits CSS custom properties, so the price component reads var(--price-sale-text). Figma variables mirror the same three tiers, with modes handling dark theme or a seasonal campaign.
A campaign recolor then means repointing one semantic token, and no component file changes. The semantic tier is also where you check contrast: sale text must reach the 4.5:1 ratio in WCAG 2.2 success criterion 1.4.3 on every surface it appears on, including card backgrounds and promo banners.
The component tier is optional for a small store. We recommend adding it once a second team or channel consumes the tokens, because that is when per-component overrides start to pay off.
Which components should an ecommerce design system include?
An ecommerce design system needs six commerce components: product card, price, variant picker, filters, cart line, and checkout form, each specified with its states and WCAG 2.2 requirements. Buttons, inputs, and navigation belong in the base kit covered in our design system components guide.
The components, side by side:
| Component | Where it appears | States to specify | Accessibility requirement |
|---|---|---|---|
| Product card | Listings, search, recommendations | Default, sale, out of stock, badge, loading, quick-add | One link target with a complete accessible name; fixed image aspect ratio |
| Price | Cards, product page, cart | Regular, sale, range, from-price, unavailable | Screen-reader text for original and sale price; no meaning carried by color or strikethrough alone (1.4.1) |
| Variant picker | Product page, quick-add | Selected, unavailable, low stock, error | Radio group in a fieldset with legend; swatches carry text names; targets at least 24 by 24 CSS px (2.5.8) |
| Filters | Listings, search | Collapsed, selected, zero results, loading | Result count announced as a status message (4.1.3); mobile drawer traps focus and closes on Escape |
| Cart line | Cart, mini-cart | Updating, quantity error, item unavailable, removed | Quantity stepper targets meet 2.5.8; a sticky mini-cart must not hide focused elements (2.4.11) |
| Checkout form | Checkout, account | Empty, filled, validating, error, saved address | Autocomplete tokens (1.3.5); no re-entry of data already given (3.3.7); accessible authentication (3.3.8) |
Four failure modes recur in these components, and each has an early sign.
- Product card variant sprawl. Teams add a card variant per campaign: with badge, with rating, with swatches, with quick-add. Define a state model (content slots plus availability and promotion states) so the card has one API. The early sign is a Storybook file with more than a dozen card stories.
- Skeleton loaders that cause layout shift. A skeleton that doesn't match the final card height pushes content down when data arrives. Google's web.dev guidance on cumulative layout shift treats a score of 0.1 or less at the 75th percentile as good. Reserve space with token-based aspect ratios and fixed price-row heights.
- Sale prices read as one number. A screen reader announces "$49 $79" with no relationship between them. Ship visually hidden labels ("Original price", "Sale price") inside the price component so no team has to remember them.
- Mobile filters treated as a shrunken sidebar. The drawer needs its own rules for focus order, a visible apply button, and result-count announcements. Give it a separate Storybook story and test it on a real device.
How to set up Figma and Storybook for an ecommerce design system
Set up an ecommerce design system by making Figma variables the only place token values are edited, exporting them to code on a schedule, and mirroring every Figma component state in a Storybook story that visual regression testing checks on each pull request. The export step is the drift fix.
The order of work:
- Build tokens as Figma variables in three collections. Keep primitives (raw color, spacing scale), semantic tokens (price-sale, surface-warning) and component tokens separate, with aliases pointing downward. Put modes on the semantic collection, for example one per brand or channel, so a marketplace skin is a mode switch and not a forked file.
- Export to code from one source. Write the variables to W3C Design Tokens Community Group JSON in the repo and run Style Dictionary to produce CSS custom properties. Figma's Variables REST API is limited to Enterprise plans, so on other plans use a plugin export. Nobody edits the token file by hand.
- Model the product card as one Figma component set. Use a state property (default, sale, out of stock, loading) plus boolean properties for badge and rating. Name each property after the React or Web Component prop it maps to.
- Write one Storybook story per state. Story args mirror the Figma properties, and the accessibility addon runs axe against every story, so a sale price with weak contrast fails before review.
- Hand off through Figma Dev Mode. Mark the component ready for dev and put the story URL in its description. Dev Mode shows variable names, so engineers copy price-sale and not a hex value.
- Run visual regression testing in CI. Screenshot every story on each pull request, using Storybook's visual testing workflow or the test runner with an image-snapshot step, and block merges on unreviewed diffs. A token change then shows every card, cart line and form field it touches.
Token drift happens when values live in both Figma and a stylesheet. A designer darkens the sale color in Figma, the CSS keeps the old hex, and the storefront ships the mismatch until someone compares screens by eye. The early sign is a raw hex in Dev Mode where a variable name should be.
The design system tools guide compares token pipelines and testing services if you are choosing between them. On a headless storefront, publish the generated CSS and components as a versioned package so each frontend consumes the same release.
What does WCAG 2.2 require in checkout forms?
WCAG 2.2 requires checkout forms to stop asking for the same data twice (3.3.7), allow password managers (3.3.8), size targets at least 24 by 24 CSS pixels (2.5.8), and never hide the focused field (2.4.11).
The table maps each criterion to the form component it constrains. The W3C Understanding documents carry the exceptions.
| Component | Criterion | What to build |
|---|---|---|
| Billing address block | 3.3.7 (A) | A "same as shipping" checkbox or prefilled values. Re-ask only when essential or for security. |
| Sign-in step | 3.3.8 Accessible Authentication (Minimum) (AA) | Allow paste and password-manager autofill. Offer an alternative to puzzle CAPTCHAs. |
| Quantity stepper, remove icon, promo apply | 2.5.8 Target Size (Minimum) (AA) | At least 24 by 24 CSS pixels, or enough spacing around smaller targets. |
| Sticky order summary, cookie banner | 2.4.11 Focus Not Obscured (Minimum) (AA) | A focused field is never entirely covered. Offset scrolling by the sticky element's height. |
| Field label, error message | 3.3.1 Error Identification and 3.3.2 Labels or Instructions (A) | A visible label. An error in text that names the field and the problem. |
| Address and card fields | 1.3.5 Identify Input Purpose (AA) | autocomplete values such as postal-code and cc-number. |
| Payment step | 3.3.4 Error Prevention, Legal, Financial, Data (AA) | Let shoppers review, confirm or reverse the order before final submission. |
Put the numbers in the design tokens, not in each page. In Figma, create a size.target.min variable and a space.sticky-offset variable, and export both with the rest of the design tokens. We recommend setting the touch minimum to 44 pixels, since 24 is only the floor WCAG 2.2 enforces.
The same sticky-offset token should drive scroll-padding in code, so a sticky add-to-cart bar or a pinned "Place order" footer cannot cover a focused input.
This mapping has limits. 3.3.8 mainly affects account sign-in, so a guest checkout with no password step has little to fail. Automated checks, including the Storybook accessibility addon, are unreliable for redundant entry and focus obscuring. Test those with a keyboard pass through the live checkout.
Design system for a headless commerce storefront
A headless storefront needs one versioned component library that every frontend consumes, with design tokens published as a package and product data shaped into component props before it reaches the UI.
The trade-off against per-frontend forks:
| One versioned library | Per-frontend forks | |
|---|---|---|
| Consistency | One definition of each product card and variant picker state | Fixes diverge once teams patch locally |
| Shipping a fix | One release, each frontend upgrades on its own schedule | Same patch in every repo |
| Upfront cost | Package pipeline and release process | Low |
| Risk | A breaking change reaches every consumer | Contained to one frontend |
Give components a presentation contract, not the raw API payload. A product card takes title, price (amount, currency, compare-at), availability, and variants. A thin adapter per frontend maps your commerce API or PIM response into that shape, so the library never learns which backend sits behind it.
The token pipeline from the Figma and Storybook section carries over unchanged. The difference is distribution: the generated CSS variables ship inside the package, and the Storybook stories double as the visual regression baseline for every consumer.
Use semantic versioning as the contract: a token rename or changed prop is a major release, a new optional prop is minor. Approval and release rules are covered in design system governance.
With a single frontend, a published package is overhead. If frontends mix frameworks, such as React and Vue, publish framework-agnostic web components or maintain thin wrappers.
Ecommerce design system template: Silk, a free starting point
Silk is Netguru's free, open-source design system for ecommerce and marketplace products, published as Figma files for mobile and responsive web. It gives a team a starting point for UI foundations, so each new initiative skips the blank file.
The files include design tokens for color, typography, spacing, and layout. They also contain core components (buttons, forms, navigation, feedback) and patterns for product lists, checkout, and account areas. Writing and contribution guidelines come with them, which gives you a governance draft to adapt.
Silk covers the design layer and does not ship coded components. Mapping the tokens into code and writing the Storybook stories for your product card and checkout fields remain your work.
We recommend it for single-brand ecommerce and B2B products that need to iterate quickly and limit design debt. A multi-brand marketplace will likely need to extend the tokens with semantic and component tiers of its own.
Netguru uses Silk on its own projects, and the Silk case study records the effect: prototyping took half the time on projects that used it, and design for a 2024 native app MVP took three months, against six months for a comparable 2021 project without Silk.
The same page reports that 80% of its users matched Silk's components to their own branding without losing design integrity. The Figma files are free to download from the Silk page.
How do you keep the system tied to conversion?
Component usage analytics tie the design system to conversion: tag each component with its name and version, then judge every product card or checkout change on the metric it owns.
In code, put data-component and data-version attributes on each component root and include both in click and impression events. Add-to-cart rate can then be sliced by product card version. In Figma, library analytics on the higher-tier plans show which components teams insert or detach. Frequent detaching points to a component that doesn't fit a real use case.
The working loop:
- Give each component one primary metric: product card to product-page click-through or add-to-cart, cart line to cart-to-checkout progression, checkout form to field error rate and completion.
- Ship a test variant as a prop or minor version behind a feature flag, so the experiment is a versioned change.
- Run visual regression testing on the Storybook stories before the test starts, so the variant differs only where intended.
- Release the winner as the default and remove the flag.
Low-traffic stores rarely reach statistical significance on a single component. In that case, test at flow level or pair the data with session recordings. For ideas worth testing, see our guide to UX changes that raise conversion rate.
FAQ
What is the difference between a design system and a UI kit?
How many components does an ecommerce design system need?
Which design tokens does an online store need?
How do you keep Figma and code tokens in sync?
Does a headless storefront need a design system?
Is there a free ecommerce design system template?
Start with the audit, then ship one flow
Start with an interface inventory of your live store, then ship design tokens and one flow, such as the product page or checkout, before touching anything else.
The inventory shows which product cards, buttons, and form fields already diverge, so the first token set covers real duplication. A single flow gives you a measurable comparison: its conversion rate and defect count against the flows still on legacy UI.
If you want a second opinion on the audit scope or on which flow to ship first, send us a short project brief and we'll come back with an estimate.
