13

    Using Component Variants and Properties

    By Nitin Khatri (Senior UI/UX Designer & Educator)
    Reviewed by Sarah Miller (Principal Product Designer (Reviewer))
    Updated
    Video Lesson: 11:00
    Level: Intermediate

    Clean up your component library by using Variants and Properties. This lesson covers how to group similar components and simplify instance management.

    Complete tasks and quiz to finish this lesson.
    Tasks
    Quiz

    Lesson Video

    Lesson Content

    Learning Objectives

    • Combine multiple components into a single Variant set
    • Define properties like state (hover, disabled) and size
    • Implement boolean properties for showing/hiding elements
    • Utilize instance swap properties for icons and other sub-components

    What You'll Learn

    1. Setting up a Variant set for UI elements
    2. Configuring properties (Toggle, Text, Instance Swap)
    3. Simplifying the user experience for other designers
    4. Best practices for naming variant properties

    Key Concepts

    Component Variants
    Boolean Properties
    Instance Swapping
    Properties Panel UX

    Key Takeaways

    • Variants group related components (e.g., Primary, Secondary, Hover buttons).
    • Component properties reduce the need for dozens of specific variants.
    • Boolean properties allow for easy toggling of UI elements like icons or labels.
    • Well-structured components make the design system intuitive for the entire team.

    Practice Tasks

    Button Variant Set

    Group related buttons into a variant set and define their states.

    • Create two buttons: 'Primary' and 'Secondary'
    • Select both and click 'Combine as Variants'
    • Rename the property to 'Type' and the values to 'Primary' and 'Secondary'
    • Add a second property called 'State' and create 'Hover' and 'Default' values

    Component Properties Management

    Reduce variant complexity by using boolean and instance swap properties.

    • Select an icon inside your button component
    • Create a 'Boolean' property named 'Show Icon' to toggle visibility
    • Create an 'Instance Swap' property to easily change icons in instances
    • Verify properties appear clearly in the right sidebar when selecting an instance

    Knowledge Check

    Pass with 70% or higher

    1. What is the primary purpose of 'Variants' in Figma?

    2. When using 'Boolean' component properties, what kind of control does the user see in the sidebar?

    3. What is an 'Instance Swap' property used for?

    4. How should you name variants to ensure they are properly organized in the UI?

    Lesson FAQ

    Q: How can I practice what I learned in this lesson?

    We highly recommend opening your own Figma workspace in a side window and repeating the steps shown in the video. Utilize the tasks checklist above for specific practice targets.

    Q: What should I do if my layout behaves differently from the walkthrough?

    Double-check parent-child constraints and resizing values (e.g. Hug vs Fill). Ensure Auto Layout direction is correct and check the related guidebooks below for step-by-step visual references.

    Prerequisites

    No prerequisites required. This is a foundational starter lesson.

    Related Guidebook

    How to create button states in Figma using variants

    Read Guidebook →

    Relevant Design Tool

    Image Compressor

    Reduce asset size before export.

    Open Companion Tool →