


Ever been in a design review that goes like this? The product lead asks for “one small change” – move the card thumbnail below the title and add a secondary action beside the primary CTA.
What should be a five-minute tweak becomes a sprint-killing reroute: The designer realizes that change isn’t an option for the component and detaches it in Figma, engineers have to fork the card and patch in custom code, and the library gains another near-duplicate component nobody will maintain. Weeks later the same product asks for a slightly different layout, and the cycle repeats until the design system is nothing more than a catalog of one-off solutions.
A different approach would have given the team a set of simple, documented parts and a flexible container they could rearrange on the fly. Instead of abandoning the system to ship a single screen, designers and engineers would compose the exact card they need, ship on time, and contribute the variant back as a vetted pattern.
Composability stops the tug-of-war between system constraints and product needs, turning your design library from a brittle set of rules into a resilient toolkit teams actually use.
The idea of Composition over Inheritance comes from object-oriented programming (OOP). The principle states that we should favor composition – assembling simple objects to build complex ones – over inheritance, where a new class inherits functionality from a base. Composition promotes reusability and flexibility in a codebase.
A classic example of the difference between the two ideas is represented through differing relationships. Inheritance is defined through an “is-a” relationship, whereas composition is expressed through a “has-a” relationship: A dog is an animal, versus a car has an engine.
When thinking about design systems, we often borrow concepts and ideas from other systems design principles. While we may not be building out interfaces, objects, and classes in a language like C#, these principles still apply to our work.
Thanks to Brad Frost, a lot of designers may already be familiar with many of the concepts of composition, even if they don’t know it. Atomic Design is largely built on this principle. In Atomic Design, you start with the smallest abstraction of atoms (design tokens push this further into ‘sub-atomic’ ideas), and then compose them into larger molecules, organisms, and eventually templates.
Composition is typically the default when it comes to constructing a design system. We likely used smaller elements to build a component, but to a designer or engineer, those components can feel opaque.
For example, a <system-button> may be constructed from a <button> parent that houses optional <icon> and <text> elements, plus padding, spacing, border, background, and color options. However, someone implementing the button in a product only sees the <system-button> and any properties or options we expose.
As systems and products scale, managing complexity becomes the name of the game. A typical example of a component that could see many variants is a card. If you lock down layout, structure, and functionality, so it only looks and behaves exactly as specified, every different card would need to be its own unique component.
In this way, when using a “locked-down”, or “drop-in ready”, component from a design system, we’re enforcing inheritance. When a supplied component doesn’t meet a design need, there is no way to modify or extend it. When this happens, designers detach components in Figma, and engineers need to write new custom code, which results in system drift and abandonment.
To offer the same flexibility that system builders benefit from, we need to provide the base component and its constituent parts to allow end users to construct a component that meets their unique needs.
If we take our card example from before, you likely already use other components within the system to build and deliver the card. Rather than shipping a locked-down single instance to your consumers, you can provide the card as a simple container with relevant styles, plus child elements that can be placed inside the card.
Including these child elements allows your users to assemble a card that fits their individual needs. Maybe they want a title first, then a thumbnail, followed by a description and a button; or perhaps they need multiple actions. Instead of having to design and build all of these pre-defined options, you simply provide the tools to allow your users to compose them on their own.
The thought of opening up your system this much may be concerning early on in a system’s life, but once your teams adopt the system and understand how to use the components and learn the guidelines, composability becomes a powerful tool for scale.
Of course, you should still provide “out of the box” solutions, and even fold some of the widely used custom solutions into the core system. This can function as a good step in a contribution model and shows others how to build their own custom components.
Let’s dive into the code for our card example. Say you’ve got a component called <SystemCard>: a basic card with a thumbnail, title, description, and link. In an inheritance model, you’ll end up with a component that has multiple props, but you can’t alter this list.
<SystemCard
thumbnail={imageUrl}
title="Card Title"
description="some lengthy description..."
link={linkUrl}
/>However, in the component’s source code, you still have to write out the code that each of these props is in reference to.
The source for the above card may look something like this:
<div class="system-card">
<img
src={thumbnail}
alt={title}
class="system-card__thumbnail"
/>
<a
href={link}
class="system-card__title"
>
{title}
</a>
<p class="system-card__description">
{description}
</p>
</div>If the system supplies more than one type of card like this, and you’re following basic DRY principles, you’ve likely already done much of the work to expose these options through composition.
If not, the basics of what we’re trying to do is to isolate each individual part of the component into small single-job components that you then combine to achieve the exact same functionality, but in a way that other components can reference or reuse.
We want something similar to this:
<SystemCardBase>
<SystemCardThumbnail
src={thumbnail}
alt={title}
/>
<SystemCardTitle
isLink
link={link}
title={title}
/>
<SystemCardDescription
description={description}
/>
</SystemCardBase>The final step in this process is to provide and expose the empty parent container, <SystemCardBase> in our example, and the child components to your consumers. You can still offer the <SystemCard> component as-is, but – because it’s now constructed with a reusable container and composable child elements – someone can reorder the structure or add an additional call-to-action by simply using <SystemCardBase> and defining the functionality and layout through composition with the child elements.
This section was written before Figma’s native slot announcement at Schema 2025. While the exact process may differ with this new feature, the concepts still apply.
The process to expose these features within Figma is very similar to code; we want to ensure that we’re using small single-job components to build out larger, complex components.
Using our end result from the code example, we would want to have four components inside Figma: SystemCardBase, SystemCardThumbnail, SystemCardTitle, and SystemCardDescription. Things diverge a little with how we need to construct the “base” component within Figma to allow for composability.

Due to how components work in Figma, you can’t add new items to a component, so we need to create a “slot” within the SystemCardBase component. For this, we need to create a new slot component; this is nothing more than a placeholder element that opens up the real superpower of composability within Figma: Instance Swapping. The way Figma implements components, you can swap an instance of one component with an instance of any other component.

Our SystemCardBase within Figma should now have an instance of our slot component inside it. To create our original SystemCard, all we have to do is create what we want the internals of the card to look like within a frame and create a component from it.

Then, using the instance swap feature on the slot component in our SystemCardBase, we will see our newly created component and can swap it out for the slot.

When you publish these new components to a Figma library, this same workflow becomes available to your designers. They can construct an internal layout that meets their needs, turn that layout into a component, and swap it in for the slot.
Teams looking to move quickly or put together a concept fast still reap all the benefits of the system with ready-to-use components. As they scale, you’ve given them the tools and a clear path to modify and customize the system to their unique and individual needs.
Working directly with teams to solve their problems is the best way to gain and maintain adoption of the design system. Composable components provide them with a straightforward, practical way to achieve this.
