Understand how to use component variants in Figma to create interactive BI dashboard elements that change appearance based on data states like status or category.
Component variants in Figma - Dashboard Guide
| Project | Status | Category | Progress % |
|---|---|---|---|
| Alpha | On Track | Marketing | 75 |
| Beta | At Risk | Development | 40 |
| Gamma | Delayed | Marketing | 20 |
| Delta | On Track | Sales | 90 |
| Epsilon | At Risk | Sales | 50 |
- KPI Card Variant: A card component with variants for Status (On Track, At Risk, Delayed). Each variant changes the card color: green for On Track, orange for At Risk, red for Delayed. Shows Project name and Progress %.
- Category Filter Variant: A dropdown component with variants for categories: Marketing, Development, Sales. Selecting a variant filters the KPI cards to show only projects in that category.
- Progress Bar Variant: A progress bar component with variants for progress ranges: 0-33%, 34-66%, 67-100%. Each variant changes the bar color from red (low) to yellow (medium) to green (high).
+----------------------+---------------------+
| Category Filter | |
| [Marketing ▼] | |
+----------------------+ KPI Cards Grid |
| | +---------+---------+|
| | | Card 1 | Card 2 ||
| | +---------+---------+|
| | | Card 3 | Card 4 ||
| | +---------+---------+|
| | | Card 5 | ||
| | +---------+---------+|
+----------------------+---------------------+
When the user selects a category variant in the Category Filter dropdown, the KPI Card variants update to show only projects matching that category. Each KPI Card variant changes color based on the project status. The Progress Bar variant inside each card updates color based on the progress percentage range.
If you change the Category Filter variant to Sales, which KPI Cards remain visible and what colors do their status variants show?
Answer: Only the KPI Cards for projects Delta and Epsilon remain. Delta's card variant color is green (On Track), Epsilon's card variant color is orange (At Risk). Their progress bars show green (90%) and yellow (50%) respectively.
Practice
component variants in Figma?Solution
Step 1: Understand component variants concept
Component variants group similar designs, like buttons with different colors or sizes, into one organized set.Step 2: Identify the main benefit
This grouping allows easy switching between variants without searching multiple components.Final Answer:
To group similar designs for easy switching between them -> Option DQuick Check:
Component variants = Group similar designs [OK]
- Thinking variants create unrelated designs
- Confusing variants with export features
- Believing variants delete components
Solution
Step 1: Recall variant creation method
In Figma, you select multiple components and use the 'Combine as Variants' button in the right sidebar to create variants.Step 2: Eliminate incorrect options
Dragging into frames or exporting/importing does not create variants. Renaming alone doesn't group components as variants.Final Answer:
Select components and click 'Combine as Variants' in the right panel -> Option AQuick Check:
Combine as Variants button = create variants [OK]
- Trying to create variants by dragging into frames
- Exporting and re-importing components
- Assuming renaming groups variants
color (red, blue) and size (small, large), how many variants will be created?Solution
Step 1: Calculate variants from properties
Each property has options: color (2) and size (2). Total variants = 2 * 2 = 4.Step 2: Confirm variant count
All combinations of color and size create 4 unique variants.Final Answer:
4 -> Option BQuick Check:
2 colors x 2 sizes = 4 variants [OK]
- Adding instead of multiplying options
- Counting only one property options
- Confusing variants with components
Solution
Step 1: Understand variant creation requirements
Components must be selected together and have compatible names to combine as variants.Step 2: Identify error cause
If components have different names and are not selected simultaneously, Figma cannot combine them as variants.Final Answer:
Components have different names and are not selected together -> Option AQuick Check:
Different names + no selection = error [OK]
- Assuming grouping inside frames creates variants
- Thinking clicking combine always works
- Ignoring component names mismatch
state (default, hover, pressed) and color (green, yellow). You want to add a new size property with values small and medium. How many total variants will you have after adding size?Solution
Step 1: Calculate existing variants
Current variants = state (3) x color (2) = 6 variants.Step 2: Add new size property
Adding size with 2 values multiplies variants: 6 x 2 = 12 total variants.Final Answer:
12 -> Option CQuick Check:
3 states x 2 colors x 2 sizes = 12 variants [OK]
- Adding instead of multiplying property options
- Forgetting to multiply new property options
- Counting only existing variants without new property
Ready to prove it?
Pass the test and this pattern moves unknown
