Skip to main content
Question

Handling Slot-Based Components with State & Size Variants in Figma


Arun Bibyan

We’re currently working on a highly complex component that supports 2–6 slots, multiple states (Default, Hover, Focus, Disabled, etc.), and two size variants (Large & Small). Users can select the desired number of slots from a dropdown, and each slot is set to Fill within the container.

However, we’ve encountered a major issue—when designers replace a slot with pre-defined slot elements and then change the state (e.g., Default → Hover or Disabled) or switch between Large and Small variants, the component does not retain its content or any overridden properties in an instance.

This is adding unnecessary complexity and preventing us from achieving the desired functionality. Has anyone faced a similar issue or found a workaround for retaining content and overrides when switching states or sizes? Any insights would be greatly appreciated!

2 replies

esharib musawer

@Arun Bibyan This issue occurs because Figma resets overrides when switching states or size variants if the structure changes. To fix this, use nested components for slots instead of direct replacements, ensuring they stay consistent. Keep the same layer names and structure across all variants to retain overrides. Utilize instance swap properties instead of manual slot changes and use Boolean properties to toggle visibility. Also, maintain Auto Layout with persistent naming to prevent resets. These steps will help retain content and properties when switching states or sizes


Angy_Brooks
  • New Participant
  • 8 replies
  • March 20, 2025

@esharib musawer Could you elaborate on what you mean by “use nested components for slots instead of direct replacements.” 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings