Component properties allow designers to define parts of a component that can be modified. All editable properties are displayed in the right sidebar, making it easy for collaborators to edit instances with component properties.
Motiff supports four types of component properties: variant property, boolean property, instance swap property, and text property.
In the example, a button's component set has 24 variants, including 2 types (primary button and secondary button), 4 states of each type (default, hover, pressed, and disabled), and the button has two positions (left and right).
By using component properties, only 8 variants need to be created.
Variant property allows you to organize similar components into a single frame, making it easier to manage components with different states.
They are used to create components with different sizes, states, or colors, such as creating a button with several different states.
Tip: You can only create variant property for variants. Learn more about Create and use variants.
Boolean property acts like a switch, with only on
and off
states.
They are used to show or hide a layer or toggle between two states. For example, a button with an icon.
Two steps involved in this process include creating a Boolean property and applying this property to a child layer.
The instance swap property allows you to display nested instances directly in the right sidebar, making it easier for collaborators to switch them quickly.
They are used when you need to replace icons, images, or other components, such as replacing the icon inside a button.
Select a nested instance within a main component or component set.
Click in the instance section of the right sidebar.
Enter a property name and set a default value.
Additionally, you can select preferred values to set a default swap range, making it easier for users to switch quickly.
Click Create property. The created property will be displayed in the instance section of the right sidebar.
Two steps involved in this process include creating an instance swap property and applying this property to a child layer.
Select a main component or component set.
Click in the Properties section of the right sidebar and select Instance swap.
Enter a property name and set a default value. Select preferred values to set a default swap range, making it easier for users to switch quickly.
Click Create Property, and the Properties section will show the corresponding property.
You need to select the child layer to apply this property. Click in the right side of the instance section and choose the corresponding property.
The instance section will show the created property.
The Preferred values feature for instance swap properties allows you to customize a list of replacement options. This helps users quickly find suitable instances for replacement, improving design efficiency.
You can set Preferred values for instances using the following steps:
Text properties are used to mark editable text content, making it easy to quickly modify text within components.
After creating text properties for a layer, users can edit the text content either in the right sidebar or directly on the canvas.
Notes: Text properties do not support rich text formats, such as bulleted and numbered lists. You can use these formats in text layers on the canvas, but they will not appear in the Properties section of the right sidebar.
Editing text that includes bulleted or numbered lists through the component property may lose the styles of the list. To retain these styles, it is recommended to edit directly on the canvas.
Tip: Even if text properties are not created for a component, text layers can still be edited. However, creating text properties makes collaboration more intuitive.
Two steps involved in this process include creating a text property and applying this property to a child layer.
Motiff supports the Simplify alI instances feature. When an instance is selected, only the component section is displayed in the right sidebar, allowing collaborators to focus solely on the component without other properties.
Note: Simplifying an instance will collapse and hide certain layer names in the layer list. Collaborators with Can edit
access can expand and edit these layers.
You can simplify an instance using the following steps:
Tip: You can add a description to a component to help collaborators understand its use cases and other details. Learn more about Add descriptions to libraries.
Motiff can expose the properties of nested instances. This allows designers to edit the properties of nested layers when selecting a component.
For example, when creating a card component, if you set the nested avatar and button to expose the properties of nested instances, the nested instances will be displayed in the Property section.
When using this component and selecting the top-level frame, all properties of the nested layers will be displayed in the right sidebar. This process allows you to edit the instances at once.
When hovering over a property in the right sidebar, Motiff will add a colored outline to the layer using that property on the canvas.
Note: The option of Nested instances will only appear if the component or variant component contains nested instances.
Select a component or component set that contains nested instances.
Click in the Properties section in the right sidebar and select Nested instances.
Check the instances you want to expose in the top-level frame.
The Property section will then display the nested instances.
By default, component properties are displayed in the following order: Variants, Boolean, Instance swap, and Text.
Variants appear above other properties. You can adjust the order of variants or reorder Boolean, Instance swap, and Text properties.
Tip: Use ⌘ Command / Ctrl or Shift to multi-select properties.
Tip: You can double-click a property to quickly change its name.
Delete
.