On this page
Fixed, Hug contents and Fill container
- Fixed: the layer keeps the width or height you type. Works everywhere.
- Hug contents: an auto layout frame shrinks or grows to wrap its children plus padding. Only auto layout frames have it.
- Fill container: a child stretches to take the space its auto layout parent has left. Only children of auto layout frames have it.
Width and height are set separately, so a button can hug its label horizontally and have a fixed height, and a card can fill the row's width while hugging its content vertically.
Take a button: a Horizontal auto layout frame with an icon and a label. Set the button to Hug contents on both axes and it grows as you type a longer label. Now put that button in a Vertical form frame with a fixed width of 360px. Switch the button's width to Fill container and it stretches to the form's width minus padding, while its height still hugs.
Why Fill container is not showing or greyed out
- The parent has no auto layout. This is the answer in the Figma forum thread on Fill being greyed out. Select the parent and press Shift+A, and Fill container appears on its children.
- The layer is a top-level frame. A frame sitting directly on the canvas has no container to fill, so the option never shows. Put it inside an auto layout frame first.
- The layer is in a group, not a frame. Groups don't have auto layout, so their children can't fill. Frame the selection with ⌥⌘G / Ctrl+Alt+G and add auto layout.
Why Hug contents is not working
Hug has two common blockers. First, the frame needs auto layout. A plain frame has a fixed size and doesn't know about its children, so add auto layout with Shift+A. Second, a parent can't hug a child that fills it. If a child is set to Fill container, the child waits for the parent's size and the parent waits for the child's, so Figma won't let the parent hug. Set the child to Fixed or Hug, and the parent can hug again.
Also check the padding. A frame can't be smaller than its own padding, so a hugging frame with 40px of padding on each side is never narrower than 80px, even when empty.
How to remove fixed width or hug
There is no "none" option. You swap one mode for another in the Width or Height dropdown in the right sidebar. To stop a frame hugging, pick Fixed and type a size. To get rid of a fixed width on a child, pick Fill container (if the parent has auto layout) or Hug contents (if the layer has auto layout itself). Figma's help center doesn't list a keyboard shortcut for switching sizing modes, so use the dropdown.
Min and max width in Figma
Min and max limits live in the same dropdowns. Open Width and choose Add min width or Add max width; open Height for Add min height or Add max height. They work on auto layout frames and on their children. When a limit is set, the width or height icon shows two extra lines so you can spot it.
Limits are how you make Fill container behave in real layouts: a sidebar that fills but never drops below 240px, or a text column that stops growing past a readable width. A min width is also the fix when auto layout wrap isn't working, because a Fill child without one never wraps.
For the full auto layout setup, including gap and padding, read how to use auto layout in Figma. For overlapping children, see absolute position.
Ranked listThe best Figma plugins for renaming and cleaning up layers in 2026Frequently asked questions
Why is Fill container greyed out in Figma?
The layer's parent isn't an auto layout frame, or the layer is a top-level frame on the canvas. Add auto layout to the parent with Shift+A and the option becomes available on its children.
Why is Hug contents not working in Figma?
Hug only works on frames that have auto layout. It also can't work when a child is set to Fill container, because each would be waiting for the other's size. Change that child to Fixed or Hug.
Is there a shortcut for Fill container in Figma?
Figma's help center doesn't document one. Set it in the Width or Height dropdown in the right sidebar.
Where is min and max width in Figma?
Open the Width dropdown on an auto layout frame or its child and choose Add min width or Add max width. Height has the matching min and max options.
More in Auto layout & frames
- How to Use Absolute Position and Z-Index in Figma Auto LayoutAbsolute position in Figma is Ignore auto layout. How to free one child to overlap others, change z-index with canvas stacking, and why you can't move a layer.
- Why Is Figma Auto Layout Wrap Not Working?Figma auto layout wrap not working? Wrap only exists in Horizontal flow, and a Fill container child never wraps without a min width. Here's how to fix both.
- How to Use Auto Layout in FigmaHow to use Figma auto layout: add it with Shift+A, pick a flow, then set gap, padding, alignment and resizing. Plus fixes for extra space and missing options.
- Frame vs Group in Figma: Which Should You Use?Figma frame vs group: groups take the size of their children, frames have their own size, clip content and auto layout. Shortcuts to group, frame and unframe.
- How to Use the Grid Flow in Figma Auto LayoutFigma's auto layout Grid flow puts children into rows and columns. How to set it up, size tracks, span cells, and how it differs from layout guides.
- What Is the Figma Auto Layout Shortcut?The Figma auto layout shortcut is Shift+A on Mac and Windows. Here are the keys to remove and suggest auto layout, plus what to do for Ignore auto layout.
- Why Are Constraints Not Showing in Figma?Constraints in Figma not showing? In UI3 they sit in the Position section, and only for layers inside a plain frame. Here's why they vanish and how to fix it.
- How to Make Figma Less Laggy and FasterFigma slow or laggy? Each file gets 2GB of memory. Check the memory meter, find heavy layers, and cut hidden layers, variants, big images and extra pages.
- How to install Figma pluginsFigma plugins don't need installing: open one from the Community or run it inside a file. Steps for Figma Design, Dev Mode, FigJam, Slides, saving and admins.
