esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

Component Library: The Shared Coded Parts Product Teams Import

Learn what a component library holds, how it fits inside a design system, and how teams install, browse, version and update one.

In short

A component library holds working code for each shared part, so teams can import the same reusable pieces on many screens and in many products.

10 min readFree

What you will learn

Product teams keep needing the same parts again and again: buttons, text boxes, cards and menus. A component library is the place where those parts are built once, written as code and shared. This lesson explains what goes inside one, how it fits inside a design system, and how teams keep it working as products change. Every new word is explained the first time it appears.

By the end, you should be able to name what a component library contains, explain how it differs from the wider design system, walk through how one button is installed and used, and describe how teams browse, version and update a library.

Key words

Component
One reusable piece of an interface, such as a single button, text box or card.
Component library
A collection of coded, reusable components that product teams can import and use.
Design system
The full set of shared rules, principles, guidance and parts that a team uses to design and build products.
Variant
A version of one component that looks or works a little differently, such as a primary button and a secondary button.
State
The condition a component is in at a given moment, such as hovered, focused, disabled or loading.
Prop
Short for property. A setting that controls a component, such as its label or whether it is disabled.
Package
A bundle of finished code that is published so other projects can install and use it.
Catalog
A browsable list of components where each one can be seen, tried and checked.
Version
A number that marks which release of a library a product is using.
Release notes
A written list of what changed in each version, what was fixed and what might break.

What does a component library contain?

A component library holds working code for each shared part. Each part is reusable, which means the same piece can sit on many screens and in many products without being rebuilt from nothing. Sources on the topic describe the same core idea: a collection of reusable parts such as buttons, inputs and cards that teams can use instead of inventing their own.

  • Components

    The core parts, such as buttons, inputs and cards. Each one has one clear job and one clear name.

  • Variants and states

    One component often comes in several forms. A button can be primary or secondary, and it can be normal, hovered or disabled. The library lists these forms so nobody has to invent a new one by accident.

  • Props

    The settings a developer sets when using a part, such as the label text or whether the button is disabled. Designers should know this list, because it shows which choices the part allows.

Components, variants, states and props in practice

Rootcode describes the library as a central place to show and document all of its UI parts.

Published as a package that teams install

Some libraries are published as a package. Think of it like an app store for code. The team publishes the library to a shared place, and each product team installs the parts it needs, much as you add a plug-in to a design tool. Atlassian's Atlaskit is a good example. Atlassian publishes its components separately. Teams can use only the packages they need, without installing everything.

How does the library relate to the design system?

The design system is the big picture. It includes principles, which are the core beliefs that guide choices. It also includes guidelines that explain when and how to use each part, the written documentation, and the parts themselves. The component library is the coded version of those parts. In short, the library is one layer inside the system, not the whole system.

Eleken makes this point plainly: a component library is one part of the design system, and the Storybook view of it is not the design system itself. A shared set of parts only works when teams also agree on the rules behind them.

  • Principles and guidelines

    Written rules, such as when a primary button is the right choice and when a text link is better. These live in documentation, not in the code of a button.

  • Design files

    The visual version of each part, drawn in a design tool. Designers use these files to test ideas before anything is coded.

  • Library code

    The working version of each part, which product teams import and run. This is the piece that makes the library a library.

What does the library cover, and what does it not?

Here is a quick check. If a team has a design file full of buttons but no shared coded button, it has design assets and no component library yet. If the team has code but no written rules, it has a library without a full system.

How do you keep code and design files in step?

The library works best when it stays in sync with the design files. If the drawn button and the coded button drift apart, designers see one thing and users get another. DesignX calls this code parity. The closer the design components, the code components and the documentation stay to one another, the healthier the system becomes. Designers and developers should review component changes together, not one side alone.

Tip

When a designer changes a part in the design file, treat that change as a request to the library team. Do not let each product team quietly build its own copy, because that is how small differences start.

Quick check

Your team's designers have a polished design file of buttons and text inputs. Two developers keep building their own buttons in code, and the buttons look slightly different on each product. What is missing, and what should the team create to fix it?

Worked example: one Button from MUI

MUI, short for Material UI, is a widely used library of ready-made components built for React, a common web tool. Its Button is a good case to study because its documentation is public. The steps below follow how a product team would use it. They show the idea, not every setting.

  1. 1

    Install the package

    The team brings the Button in from the MUI package. From then on, the Button is a ready part the team can place on any screen, without drawing or coding one from scratch.

  2. 2

    Pick a variant

    The MUI Button comes in three variants: text, which is the default, contained and outlined. The team picks the one that fits how important the action is. A contained button suits the main action on a page. MUI's own guidance notes that text buttons suit less-pronounced actions, such as those inside dialogs or cards.

  3. 3

    Set the disabled state

    The Button has a disabled setting, which is off by default. Turning it on stops the button from being clicked and gives it the disabled look. The library adds a standard disabled class for this, so the product team does not have to style every disabled button by hand.

  4. 4

    Use the shared look

    Teams can also choose a color, such as primary or secondary, from options the library already defines. Because the choices come from the library, two products that pick primary get the same primary button.

  5. 5

    Update it in one place

    When the library team fixes or changes the Button, the change lives in the library's code, not in each product. Every product that imports the Button receives the change when it moves to the new version. A product that stays on an older version keeps the older look until someone upgrades it.

Atlassian follows the same idea in Atlaskit. That step is worth noticing: a component depends on other code, so the installation order matters.

Tip

A change in the library reaches a product only when that product upgrades. Before you upgrade, read the release notes, check the catalog for the new look, and plan the move. Do not assume every product changed overnight.

How do teams use and maintain a library?

A library is only useful if people can find parts and trust them. Teams therefore spend as much effort on browsing, versions and requests as on building the parts. The three habits below keep a library working as products grow.

Browsing a documented catalog in Storybook

Storybook is an open-source tool for building and showing components one at a time, outside the full product. Each part gets a story, which is a small example that shows one variant or state. A designer can open the story for a button, switch it to disabled and see the result, without opening the product. Storybook can also create documentation automatically, which helps the catalog stay close to the code.

Tip

Check the catalog before building anything new. Eleken notes that Storybook helps developers discover what already exists before building something new.

Versions and release notes

Each published package carries a version number. When the library changes, the team gives it a new version. Atlaskit publishes each component as its own package. Release notes explain, in plain words, what changed and whether anything might break. DesignX also lists breaking changes and versioning rules as part of good governance.

Updates and contribution requests

  1. 1

    Spot a gap

    Someone notices that a product needs a part that does not exist yet, or that an existing part behaves badly.

  2. 2

    Send a contribution request

    The person writes a short request to the library team with an example, the reason, and the screens where the problem appears.

  3. 3

    Review against the rules

    The team checks whether the problem repeats across products and whether a similar part already exists. DesignX makes this point: a component that solves a recurring problem belongs in the library.

  4. 4

    Build, document and release

    If the request is accepted, the part is built, shown in the catalog and released as a new version with release notes.

  5. 5

    Upgrade when ready

    Each product team moves to the new version on its own schedule, and reads any flagged changes first.

Tip

A part that only serves one screen usually belongs in that product, not the library. DesignX notes that one-off patterns with no repeat value probably should not become system components yet.

Quick check

Your product uses a button from the shared library. The library team has just released a new version that changes how disabled buttons look. A designer asks why the product still shows the old disabled look. What is the most likely reason, and what should happen next?

Putting it together

  • Build once, import many times

    A shared part is written once in code, then imported by every product that needs it.

  • Keep the library and design files matched

    Mismatches between the drawn part and the coded part are a source of inconsistency.

  • Version and explain every change

    Version numbers and release notes tell product teams what changed and when to upgrade.

A component library is the coded, shared set of parts inside a design system. It turns the drawn parts and written rules into working building blocks. Its value depends on three things: clear variants and states, a catalog people actually browse, and a steady way to request, release and upgrade changes. Next, you can learn what a single component is and how to design one, which is the building block this library is made from.

Sources

How is this lesson?

Last updated on 17 November 2026

Learn with me

Every lesson is free. I add new ones as I learn. Have a question, or want help with your own work? Book a short call.