🎨

Creating Versatile Button Components in Figma

Feb 8, 2025

Figma Button Component Tutorial

Introduction

  • Presenter: Sergey
  • Purpose: Learn how to create a complex button component with multiple variants in Figma.
  • Resources: Work file available from the link in the video description.

Creating a Button

  1. Select Type Tool: Press 'T' and write text ("Button").
    • Use Poppins font, size 16px.
    • Set vertical trim for consistent paddings.
  2. Create Outer Layout:
    • Select text layer, press 'Shift + A' to create an auto layout.
    • Add fill color (e.g., blue).
    • Set paddings: Top/Bottom - 16px, Left/Right - 24px.
    • Fix height to maintain size with/without icon.

Icon Components

  • Prepare Icons: Make each icon a separate component.
  • Add Icon to Button:
    • Use 'Option + Drag' or via Assets panel to add icon instances.

Creating Button States

  1. Primary Button Setup: Start with a primary button.
  2. Variants and Copies:
    • Color Variants: Create copies for different colors (e.g., green).
    • Icon Position: Create variants with icon on left/right.
    • Hover Effect: Change color or add stroke for hover state.
    • Active State: Darker color for click effect.
    • Disabled State: Use gray color for non-clickable buttons.
    • Corner Radius: Create variants with straight/rounded corners.

Naming and Organization

  • Component Naming Structure:
    • Format: Button / Color / Corners / State / Icon Position
    • Example: Button / Blue / Straight / Default / Left
  • Bulk Renaming: Use 'Command R' to rename multiple objects.

Creating Component Set

  • Select All Variants: Use 'Create Component Set' to combine.
  • Naming Properties: Assign properties like color, corners, state, and icon position.
  • Boolean Property: Toggle to show/hide icon.

Utilizing the Component

  • Testing: Add to assets and test properties.
  • Changing Icons: Switch icons within button variants using the dropdown in the right panel.

Benefits

  • Efficiency: Changing the main component applies changes universally.
  • Consistency: Ensures uniform design across all instances.

Conclusion

  • Encouragement to practice creating components.
  • Reminder to like and subscribe for more Figma tutorials.

End Note: Video aims to simplify creating versatile and efficient button components in Figma.