You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/components.md
+32-46Lines changed: 32 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ Find out more about [component pages](#components-page).
86
86
87
87
Main components are bold and colored pink in the <ahref="https://lunacy.docs.icons8.com/interface/#layer-list"target="_blank">Layer list</a>, and there’s a component symbol (<embedtype="image/svg+xml"alt="main_component"src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/JApz_Mo2XE6YIoPMoYA3ow.svg"width="16" />) in front of their name.
88
88
89
-
Main components with more than one [state](#component-states) come with a dashed border around the symbol.
89
+
Сomponents with more than one [state](#component-states) come with a dashed border around the symbol.
90
90
91
91
Component instance names aren’t bold but have the instance symbol (<embedtype="image/svg+xml"alt="instance_icon"src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/7zBFwNg0JEKWT8fAiIVn9A.svg"width="16" />) and the same pink color. When they’re selected, their properties and options appear in the **Component** section of the right panel.
92
92
@@ -226,7 +226,7 @@ Still, the quickest way to categorize your components is to create [component st
226
226
227
227
You can **edit a component**:
228
228
229
-
- Right on the canvas like any other design element. This is the most straight forward and convenient way to edit components.
229
+
- Right on the canvas like any other design element. This is the most straightforward and convenient way to edit components.
230
230
- In the **Component editor**.
231
231
- On the **Components page**.
232
232
@@ -257,20 +257,24 @@ You can **edit a component**:
257
257
258
258
## [Swapping components](#swapping-components)
259
259
260
-
Use the **Components tab** or the **right panel**swap between instances from entirely different components. Simply select an instance you want to replace and use one of the following methods.
260
+
You can swap between instances of different components. Simply select an instance you want to replace and use one of the following methods.
261
261
262
262
**Method 1**:
263
263
264
264
1. Go to the **Components tab**.
265
265
2. Find the required component and click <embedtype="image/svg+xml"alt="swap_components"src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/FwHiX5HVcE23ZwIlDilhyw.svg"width="16" />
@@ -282,53 +286,31 @@ When you delete a component, all of its instances turn into frames.
282
286
283
287
## [Managing instances](#managing-instances)
284
288
285
-
We already covered how to create component instances to the canvas from the **Components tab**. You can also duplicate or copy/paste instances directly onto the canvas.
286
-
287
-
With a component or instance selected:
288
-
289
-
- Press `Ctrl + D` or `Ctrl + C → Ctrl + V`.
290
-
- Hold down `Alt`, then drag to place an instance on the canvas.
291
-
292
-
#### Component instance properties
293
-
294
-
For a component instance, the **Component** section in the **right panel** will look like this:
A dropdown menu displaying the current state of the component. When open, it shows all other components and UI kits available in the document.
301
-
302
-
If you didn’t create any component states, this property will read **Default State**.
303
-
304
-
#### Component states
305
289
306
-
Select one of the presets to organize your components by type. Changing this for a component instance will affect its main component and vice versa.
290
+
### Creating instances
307
291
308
-
#### Detach from component
309
-
310
-
Detach the instance from its main component or press `Ctrl + Alt + D` / `⌘ + ⌥ + B`.
311
-
312
-
#### Reset instance size
313
-
314
-
If you resized the instance, click this button to revert it to the size of the main component.
315
-
316
-
#### Go to Component
292
+
To **add a component instance** to the canvas, you can:
317
293
318
-
Redirects you to the instance's main component.
294
+
- Drag it from the **Components tab** to where you want to place it.
295
+
- Duplicate the existing instance on the canvas.
319
296
320
-
#### Component type
297
+
See the video in the [Reusing components](#reusing-components) section.
321
298
322
-
See the corresponding [main component property](#main-component-properties).
299
+
### Instance properties
323
300
324
-
Once you modify an instance, the <embedtype="image/svg+xml"alt="reset_overrides"src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/PmMyhR72A0GyShZvh91lgA.svg"width="16" > button appears in this section, indicating that the instance has an override:
301
+
When you select a component instance, the right panel shows an additional sectionthat looks like this:
Click it to **reset the override** and revert the instance back to the style of the component.
329
305
306
+
-**Component list**. A dropdown menu displaying the name of the component. When open, it shows all other components available in the document. By choosing items in the list you can [swap components](#swapping-components).
307
+
-**Component states**. Previews of all availalable [component states](#component-states).
308
+
-**Detach from component**. Use this button (or `Ctrl + Alt + D` / `⌘ + ⌥ + B`) to detach an instance from its component. Once detached, the instance will no longer reflect changes made to the original component.
309
+
-**Go to Component**. This button will bring you to the instance's main component.
310
+
-**Reset overrides**. Use this button to remove all [overrides](#overrides) and restore the instance to the component’s original appearance.
311
+
-**Component type**. This setting currently has no visible effect.
330
312
331
-
## Creating overrides
313
+
## Overrides
332
314
333
315
To reiterate, an override is any edit you make to a component instance. Let's go over them in detail.
334
316
@@ -338,11 +320,11 @@ Click `▾` next to the title of a component instance in the Layer list to expan
338
320
339
321
Some basic overrides you can make are changes to layer color, text, or image content.
340
322
341
-
Below, we have a simple example of a card component consisted of an image (an oval with an **Image** fill) and a labeled button. We make three types of overrides to the card, changing the **button color**, the **button label**, and the **image**.
323
+
Here’s a simple example of a card component made up of an image (an oval with an **Image** fill) and a labeled button. We applied three overrides: changed the **button color**, updated the **button label**, and replaced the **image**.
You can easily reset all of these overrides by pressing <embedtype="image/svg+xml"alt="reset_overrides"src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/PmMyhR72A0GyShZvh91lgA.svg"width="16" > in the **Component** section, like in the demo above.
327
+
You can easily reset all of these overrides by pressing <embedtype="image/svg+xml"alt="reset_overrides"src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/PmMyhR72A0GyShZvh91lgA.svg"width="16" > in the instance properties.
346
328
347
329
Here’s a full list of layers and properties you can create overrides for:
348
330
@@ -353,6 +335,8 @@ Here’s a full list of layers and properties you can create overrides for:
353
335
- Tints
354
336
- Hotspots
355
337
338
+
<!--
339
+
356
340
#### Understanding overrides
357
341
358
342
To understand how all of them work, we'll use more complex examples. Also, instead of making some overrides (like text and image edits) manually, we'll use some of Lunacy's handy time-saving features like <a href="https://lunacy.docs.icons8.com/text/#text-generation-and-text-snippets" target="_blank">text generation</a> and the <a href="https://lunacy.docs.icons8.com/tools/#avatar-tool" target="_blank">Avatar tool</a>.
@@ -464,6 +448,8 @@ For example, there’s quite a few auto layouts in our profile card examples:
0 commit comments