There will be many similar components when you create components and build a design system. For example, you might have components for buttons with different sizes and colors.
Component sets allow you to organize similar components into one container. This simplifies your component library and makes it easier for users to find the needed components.
In the example, there is a button component set with 24 variants. The component set has four properties, each containing a set of values.
Tip: Multiple components can be combined into one component set, and each subset inside after grouping is called a variant of this component set.
To efficiently group components into variants, you can rename them and organizing them on the canvas.
Button/Primary/Large/Default/On
) to define the structure:
Motiff organizes variants into a single container called a component set. Component sets can only include components.
Click Create Component in the toolbar or use the shortcut:
You can click in the right sidebar to add a variant. This will duplicate the current component and group these two components into a component set.
At this point, Motiff will:
You can also create a new variant by grouping multiple components.
Variants allow you to create multiple design options within a component set. Follow these steps to add more variants:
Select the component set and either:
Select a variant and use the following shortcuts to duplicate it.
Drag other components into the component set to add them as variants.
Note: When you add an instance of the component set to your file, Motiff will import every variant in that component set. Importing large component sets can affect Motiff's speed and performance.
In a component set, you can define different variants by adding any number of properties and values to the variants, and you can even map the properties and values of the variant components to the code components in the design system.
All variants in a component set share a set of properties and values, but each variant must be a unique combination. You don't need to create a variant for every combination of properties and values.
When creating a component set for the first time, you need to add new properties and values to the component set.
Note: If two variants have identical combinations of values, Motiff will let you know conflict. You should add or update the values of the conflicting variants to ensure uniqueness.
Motiff adds new variants in a single column by default and retains the original layout when grouping components.
You can customize the arrangement by dragging variants to any position, resizing the component set in the right sidebar, or adjusting spacing with the Horizontal and Vertical icons.
The top-left variant will be used as the default representation in the Assets panel.
Motiff assigns generic names like Property 1, Property 2, etc., by default. You should rename these properties to make them more descriptive:
Note: Similar to regular components, you can add descriptions to component sets, drag the component set from the Assets panel onto the canvas, or replace instances in the Instance menu.
Properties define the variable aspects of a component set, such as size, state, or color. After creating a component set, you can manage its properties and values as follows:
Note: If properties or values are mistyped, Motiff will display an error prompt. To resolve this, rename them in the right sidebar rather than editing layer names directly.
Publishing a component set makes it accessible to your team or organization, ensuring design consistency and simplifying collaboration.
Once published, the component set becomes available in the Library, where team members can easily find and use it.