How to design better component APIs for your design system

Cristian Morales Achiardi
Written by Cristian Morales Achiardi
Sep 17, 2026

For the past year, I’ve worked across a wide range of design systems, directly or through mentees: React and React Native libraries, web components for Vue and Angular, and a multi-brand, multi-language Flutter library spanning more than ten brands. Different teams, different company structures, different ways of doing the same job. And every one of them shared the same issue.

Tokens are mostly solved: We have a spec and lots of tooling. Props are left ungoverned without the same rigor.

A design token gets a name that describes its meaning, along with a review process when someone proposes a new one. Props sometimes get invented on the spot, in Figma or the codebase. We found that the button variant is named outline, and that the chip variant is named outlined. A dev can get confused by this and lose time trying to figure out why the component isn’t rendering correctly. The prop surface is a pile of synonyms: similar words describing the same meaning.

What makes a component API

A component API is the contract a component exposes: the controls a consumer uses to configure, style, and drive it. Fernando Ruiz frames what a properly built API should answer cleanly: What does it receive? (e.g., props like label, icon, and size). What can it do? (e.g., events like onClick, onChange, and onDismiss). How does it look across scenarios? (e.g., variants like primary, secondary, and ghost).

Designers have gotten good at the third question. Variants are visual, so they live where we already work. The first two are where the drift hides, because their vocabulary and grammar don’t come from us.

What you inherit vs. what you author

Props come from the codebase stack, but how much you inherit depends on the combination of framework and libraries. These are abstractions built to make development easier by handing you solved decisions, and every solved decision is one you inherit instead of authoring. That sets a ratio. A React library inherits most of its vocabulary and grammar from what sits underneath. A web component library, on the other hand, lets you author almost all of it. The less machinery you build on, the more of it is yours, and the more there is to get wrong with no framework to fall back on.

A quick reference to React Native naming conventions, covering file names, component exports, prop names and values, variants, className tokens, and hooks.

The grammar you do inherit is legible once you read it. Booleans announce themselves with is, has, or should: isDisabled, isLoading, hasIcon. Finite options are enums with mutually exclusive values: size="sm | md | lg". Data-carrying props say what they carry: label or text, never data. None of this is taste. It’s the contract that the implementation already addresses, and when the Figma property diverges from it, the design describes a component the code won’t build.

A prop catalog example for the interaction Pressable shows a table for its props, kind, accepted values, default values, owner, and which components use it.

Design tools never surfaced any of this, so designers author prop names as if the naming space were empty. It never is, and it is emptiest — and most in need of governance — exactly where inheritance is lowest.

Properties define logic

A prop describes state and behavior. It carries a type, a set of accepted values, a default, and sometimes a handler or a slot. isLoading is not a pointer to a value; it’s a state the component can occupy.

What transfers from tokens is the discipline, not the shape. One name, one concept, no synonyms. That single rule is why outline and outlined can’t both exist, and it’s the rule prop surfaces have never had applied to them.

A simplified example of how a component's use cases define the anatomy and behavior of a component to build its API.

The asymmetry is visible the moment you audit. In one system with React and React Native libraries, there were 214 distinct props, but only 14 shared axes with canonical values, such as size, variant, color, and radius. The other 200 are booleans, event handlers, slots, and component-local props.

Build a prop map

So audit props the way you already audit tokens, and write the result down. A prop map is a generated glossary and lookup table: every prop, its type, its accepted values, and the components that use it, with divergence flagged.

  • Axes are the system-wide vocabulary with canonical values (size, variant, color).
  • Booleans are is/has/should flags.
  • Handlers are events (onDismiss).
  • Slots take nodes (title, trigger).
  • Local props belong to one component.
  • Platform props come from the runtime (testID).

Only the axes get canonical values and an anti-synonym glossary. The rest just need to stop duplicating each other under different spellings.

An axis is a small, structured record. This is what makes it queryable by a person or an agent:

json{

  "size": {

    "concept": "One ordered scale; each component exposes a contiguous subset.",

    "values": ["2xs", "xs", "sm", "md", "lg", "xl", "2xl"],

    "default": "md"

  },

  "variant": {

    "concept": "A component's named look. Per-component, but values must come from the glossary.",

    "values": "per-component (glossary-constrained)",

    "aliases": { "outlined": "outline" }

  }

}

The aliases field does the work. It’s a machine-readable record of which spelling won, so the wrong one can be caught instead of relitigated.

Underneath the axes sits the value glossary, which is nothing more than one spelling mapped to one meaning:

  • outline: Border only, transparent background. Canonical, never "outlined".
  • neutral: The neutral/default semantic color. Canonical, not "base" or "default".
  • soft: Tinted or translucent background, medium emphasis.

Keep the first pass descriptive. Resolve nothing, migrate nothing. You document what exists and annotate the drift, so the output is a backlog you can review, not a migration you never agreed to. The drift report is where the value shows up immediately:

Spelling drift (anti-synonyms)

  •   Card: value outlined → canonical outline
  •   Chip: value base → canonical neutral
  •   Button: value rounded → canonical full

Prop-name drift (right axis, wrong name)

  •   IconButton: prop sizeVariant is the size axis under a non-canonical name
  •   Typography: prop textColor is the color axis under a non-canonical name

Every line there is a bug a developer would otherwise have hit at render time, surfaced before it shipped.

How to build it

Point an agent at the component source or the defined framework and library combination to catalog props and values and emit the map. The audit that used to be manual reading is now close to free. 

An IDE window shows on the left side a prop map JSON file as a deterministic validator. On the right side is a lookup table for designers and developers.

You can ask the agent to build a script that runs it, so the process is deterministic. The rule the agent enforces is: one prop, one name; one value, one spelling.

How to use it

When you spec a new component, you start from use cases and lay out the states it needs. With the map open, that step changes shape. You query it. 

Is there already a canonical axis for this behavior? Reuse the name and its values. 

Is the value you want in the glossary, or are you about to coin outlined next to an existing outline? Point an agent at the requirements and the map, and it returns a prop table or builds the component against the contract directly. 

A diagram of the whole machinery pipeline that generates components starting from decisions and contracts. Once a component contract is defined, AI checks accepted props and prop values to generate the component logic and styles, its documentation, and the component Figma version.

It does not matter whether you work in Figma or in code. You are enforcing one language across both, which is the only thing that produces real parity between them. For Figma, you’ll need a bridge: It can be the native Figma MCP, TJ Pitre’s figma-console-mcp, or Sil Bormüller’s figma-cli.

The contract is the artifact

Load the map from the repo if you’re on the team. Expose it through your design system MCP, or publish it as a documentation page that any teammate or agent can fetch. The mechanism isn’t relevant.

The interesting part is that a design system is its contracts, and until now, the prop half of that contract was unwritten. Tokens made your visual decisions queryable. A prop map does the same for your component vocabulary and turns naming that used to live in individual memory into something the system can enforce.

Cristian Morales Achiardi
Cristian Morales Achiardi
Cristian came to design systems from advertising and branding, and has spent over a decade bridging design and engineering. At Southleft, he builds methodologies and infrastructure for AI-powered design systems. Through his independent practice at giorris.dev, he uses frameworks and facilitation to help teams grow AI fluency and a builder mindset.
Try zeroheight
The design systems platform that keeps teams and agents in sync
Start for free
Share this post