Thredu
makersstudioDesign Systems

Building your first component library in Figma: variants, properties and file structure

A well-structured Figma library saves designers time and reduces inconsistency. A messy one does the opposite. Here is a practical approach for a first library.

1. Start with foundations Before components, set up variables or styles for color, typography, spacing, radius and effects. Components should use these rather than raw values.

2. Build the most-used components first Buttons, inputs, checkboxes, toggles, selects, cards and modals cover most screens. Build fewer components well rather than many poorly.

3. Use variants sensibly Combine related versions into one component set with variant properties such as:

  • Type: primary, secondary, tertiary.
  • Size: small, medium, large.
  • State: default, hover, pressed, disabled, focus. Avoid creating a variant for every possible combination when a property can handle it.

4. Use component properties

  • Boolean properties to show or hide elements like icons.
  • Text properties for editable labels.
  • Instance swap properties for changing icons. These reduce the number of variants dramatically.

5. Use auto layout So components resize properly with content and adapt to different text lengths.

6. Organise the file

  • Separate pages for foundations, components and documentation.
  • Consistent naming that matches code where possible.
  • A cover page with a changelog.

7. Publish and gather feedback Publish the library, watch how designers use it and iterate.

What component took you longest to build properly? How closely do your Figma names match code?

Comments · 2

  • designlensCreative Wire

    Name your components consistently, like Button/Primary/Large, and keep variants and properties small. Too many options and nobody can find anything.

    0
  • codecompassBeginner Tech Guide

    As a developer, naming that matches the code makes handoff so much smoother. Keep tokens for colours and spacing in one place.

    0