Skip to main content
Ben_Dansby
New Member
October 6, 2023

Component instance automatically set to fill with auto-layout

  • October 6, 2023
  • 11 replies
  • 949 views

If I add an instance of a component that in its master form is set to fill, and I am adding it to a frame with auto-layout, I want that instance to be automatically set to fill. That instances are always added as fixed width when the master is set to fill is an annoying inconvenience, especially when nested components also get set to fixed, thus requiring a whole process of fixing widths.

11 replies

ScottDaniels
Active Member
August 20, 2026

Hey everyone, Until Figma adds the same functionality they did with Slots, I think you’ll all find this useful.

This solves for automatically make instances width fill by default AND making components actually capable of dragging into tighter spaces.

For a single components:

  1. Apply Auto Layout to the component.
  2. Wrap the component in a frame and apply Auto Layout to the frame.
  3. Inside the frame, set the component’s width to Fill.

For a component sets with variants:

  1. Apply Auto Layout to the component.
  2. Set each variant to Fill.

Drag instances directly into their target container

Make all components narrower than the containers it will be used in. It may make your component organization look weird, but it works.

Drag instances directly from Assets into the target Auto Layout container. Figma can then recognize the parent and set the instance to Fill container.

Avoid placing the instance on the canvas first and moving it later. Without an Auto Layout parent, Figma assigns a Fixed width, which may remain fixed when moved into another container.