15. Using Frames/Groups
Frames are a fundamental part of managing the responsiveness and organization of your design. In this lesson we’ll be going over everything you need to know about frames.
Adding a Frame
Managing Elements Within a Frame
Grouping Elements
Styling a Frame
Clipping Content
Resizing Frames
Adding a Frame
Frames are a multi-functional tool allowing you to group items within them but they can also be used to create basic shapes such as a rectangle or line.
You can easily add a frame from the top bar navigation by selecting the frame icon, or by using the shortcut [F]. Once selected you can then click-and-drag onto the canvas to specify the desired size.
Managing Elements Within a Frame
Once a frame is on your canvas, you can nest other elements inside it to create groups. This process is called nesting.
Adding Elements to a Frame
When an element is nested, the frame becomes the parent and the element inside is the child. This relationship is shown in the Layers panel, where child elements are indented beneath their parent.
There are three primary methods to nest an element within a frame:
The first way is to draw a new element directly into a frame. First select your desired element, either from the top-bar-navigation or from the add menu. Then, draw the new element directly inside the borders of the existing frame.
Another way is to move an existing element on canvas into a frame. Select the chosen element that's already on the canvas and click-and-drag it into a frame. You’ll need to hold the [⌘/CTRL] key while dragging it over the parent frame.
You can also manage child elements within the layers panel. Simply click and drag any element directly onto a frame layer. A white outline will indicate where it will be nested.
Selecting Nested Elements
You can select nested elements on the canvas by either:
Double-Click: A single click selects the parent frame. Double-click to drill down and select the child element inside.
Direct Selection Shortcut: For a faster method, hold [⌘/CTRL] and click. This bypasses the parent and instantly selects the element you clicked on, no matter how deeply it's nested. You can also select any element directly from the Layers panel.
Moving Elements Out of a Frame
By default, dragging a child element visually outside the frame's borders does not remove it from the group; it remains a child in the Layers panel. To un-nest the element you’ll need to:
On the Canvas: Hold [⌘/CTRL] while dragging the child element away from the parent frame.
In the Layers Panel: Click and drag the indented layer out of its parent frame.
Layer Order and Constraints
Inside a frame, elements are stacked based on their order in the Layers panel. Meaning elements higher in the order are in foreground and lower elements are in the background.
Another note is that a child element's position and size are relative to its parent frame, not the entire section. A child element set to 50% width will be 50% of the parent frame's width.
Grouping Elements
You can also instantly create a frame by grouping existing elements on your canvas.
First, select all the elements you want to group. This can include other frames. There are three ways to select multiple items:
On the Canvas (Shift-Click): Select one element, then hold [SHIFT] and click on any additional elements.
On the Canvas (Marquee Select): Click and drag your cursor to draw a selection box around the elements.
In the Layers Panel: Hold [⌘/CTRL] and click on each element's layer.
Once your elements are selected, you can group them in two ways:
Keyboard Shortcut: Press [⌘/CTRL G].
Right-Click Menu: Right-click on your selection and choose Group.
A new frame with a transparent background will be created around your selection, and the elements will be nested inside it. This new parent-child structure will also be visible in the Layers panel.
Styling a Frame
When a frame is selected, its styling options appear in the style panel on the right-hand side. Like other elements, you can apply the background, border, border-radius and other styling properties. You can also control spacing with padding and margin.
Clipping Content
Just like we covered in the Adding a Section lesson. The Clipping feature hides any part of a child element that extends beyond the frame's borders. To enable it, select the frame, and within the Style panel under Layout, you’ll find the option for Clipping.
Within the dropdown, select Clip Overflow to hide content outside the frame's boundaries. You can also use this dropdown to clip the frame's content into various shapes.
Resizing Frames
You can resize a frame by dragging its handles on the canvas or by entering specific values in the Style panel.
Child elements within the frame that use percentage-based sizing will scale dynamically relative to the parent frame's dimensions. Their positioning is also relative to the frame's size. If you move an object outside of the frame this will still show unless you have the clip content option selected.
One helpful button within the style panel is the Resize to fit option. You can easily resize the frame to contain the child components by selecting this button in the style panel.
→ Next up, let’s explore: Adding a Text Element