Both frames and groups can be used to contain other layers in Motiff, but each offers unique properties and use cases. This article will discuss the differences between frames and groups to increase your design flexibility.
When creating designs based on a specific device or screen size, you can use a frame to define an interface area. Motiff’s frames offer more comprehensive features than the artboards of traditional design tools. Aside from containing design content similar to an artboard, you can add auto layout to a frame, nest frames, and set constraints for child layers within a frame. These properties can help you create more complex designs. Moreover, you can add basic properties to a frame, such as rounded corners, fills, strokes, and other effects.
Similar to groups in other design tools, groups in Motiff allow you to combine multiple layers together. The properties of a group are composed of its child layers and do not have any individual properties. When you resize or move a child layer, the boundaries of the group will be changed accordingly.
In summary, a frame has its unique properties and remains unaffected by the properties of its child layers, while the properties of a group are determined by its child layers. The following discussions will further delve into the features of parent-child relationships, frames, and groups.
In Motiff, we use terms such as parent, child, and sibling to describe the relationships between layers. These terms are commonly used in explaining similar relationships in programming. This section will explain the specific meanings and usages of the terminology used to describe the relationship between layers in various scenarios.
Note: If you have experience with Object-Oriented Programming (OOP), it's important to note that the parent/child relationships in Motiff are unrelated to inheritance.
In Motiff, the functions of these relationships have more similarities with the Document Object Model (DOM), i.e., a frame with elements inside them.
In Motiff, the definitions of parent layers, child layers, and sibling layers are as follows:
After introducing the parent/child/sibling relationships between layers, this section will focus on the creation, properties, resizing, and moving operations of frames.
You can use tool to create frame layers on the canvas. Motiff supports the following methods:
Additionally, you can create frames of various sizes on the canvas:
Tip: Motiff supports directly creating a frame over existing layers (both single and multiple layers are supported). The shortcuts are as follows:
Frame layers have the following properties:
Rounded corners: Create softer edges for a frame.
Clip content: After turning on the clip content switch, any layer content that exceeds the frame boundaries will be hidden.
Auto layout: Create containers that dynamically respond to content changes.
Fill: Apply solid color, gradient, and image (PNG, JPEG) fill types to a frame.
Stroke: Support adding a stroke to a frame to create a border or outline.
Effects: Support adding shadows or blurs to a frame.
Frames in Motiff contain some special capabilities that are not available to other layer types:
Tip: Since a frame is a parent layer, you can adjust any child layer within the frame.
You can resize or scale the frame just like other layers on the canvas.
Drag the boundary box of the frame with the mouse to manually adjust its size:
Tip: Hold the modifier key to temporarily ignore constraints on child layers:
Select a default template to change the current frame's size:
Note: If you have applied constraints to child layers, Motiff may resize the child layers to fit the new frame. For child layers without applied constraints, they will maintain their initial size and position.
You can adjust the width and height of the frame in real-time using the Design panel in the right sidebar.
Motiff currently supports entering numbers in the input box areas corresponding to W and H . You can hover the mouse over the corresponding icons and drag to adjust parameters. Drag left to decrease the value, and drag right to increase it.
Toggle the link buttons on the right side of the width and height input boxes to adjust whether Constrain proportions is turned on or off.
Tip: The current input box supports the following types of operations:
You cannot directly multiply width or height by a percentage. *50% will result in 50 times of the original size instead of 50%.
Resize to fit allows the frame to automatically resize its content.
Motiff supports placing other layers within frames, groups, etc. We refer to this process as Nesting. Nesting enables the combinations of different layers to create complex interfaces. The nesting of frame layers introduces new hierarchies and concepts:
As shown in the figure below, the status bar, navigation menu, and detail information on the left side of the example file are parent frames that contain child layers. Using a default size template, you can create another top-level frame for these three modules, making the aforementioned three modules frames as non-top-level frames.
Tip: Although the above terms are not directly mentioned in Motiff, they are crucial to a proper understanding of the properties of parent-child layers, nested layers, and their effects on each other.
When you move a layer to a new position, Motiff may reassign its parent layer. For frame layers, reassignment occurs when you move the layer into a frame, remove it from its current parent frame, and place it in another frame.
In Motiff, when you move a layer into a non-top-level frame, follow this default logic:
Note: When you move a layer into the top-level frame, it will become a child layer of the frame regardless of its size.
When adding a new layer within a frame, as long as the cursor's starting point is inside the frame, the newly added layer will become a child layer of that frame regardless of its size.
If you want to maintain the original parent-child relationship while moving a layer, you can hold the following shortcut keys:
After selecting a frame, you can directly delete it using the delete key. Note that directly deleting a frame will also delete all of its child layers.
If you want to delete a frame while keeping all of its child layers, you can select Ungroup selection from the right-click menu or use the shortcut keys:
To create a group, you can select some layers and then choose Group selection from the right-click menu or use the shortcut keys:
The first time you click on a layer within the group, the entire group will be selected. To select an individual child layer within the group, you need to double-click or directly select the target child layer from the Layers panel.
When you want to ungroup, select the group and right-click the menu to choose the Ungroup selection option, or use shortcuts:
The properties of a group consist of a combination of its child layers and don’t have any properties themselves.