Skip to content

Commit 6473342

Browse files
committed
components updated
1 parent e5422dc commit 6473342

File tree

3 files changed

+32
-46
lines changed

3 files changed

+32
-46
lines changed

docs/components.md

Lines changed: 32 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Find out more about [component pages](#components-page).
8686

8787
Main components are bold and colored pink in the <a href="https://lunacy.docs.icons8.com/interface/#layer-list" target="_blank">Layer list</a>, and there’s a component symbol (<embed type="image/svg+xml" alt="main_component" src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/JApz_Mo2XE6YIoPMoYA3ow.svg" width="16" />) in front of their name.
8888

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.
9090

9191
Component instance names aren’t bold but have the instance symbol (<embed type="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.
9292

@@ -226,7 +226,7 @@ Still, the quickest way to categorize your components is to create [component st
226226

227227
You can **edit a component**:
228228

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.
230230
- In the **Component editor**.
231231
- On the **Components page**.
232232

@@ -257,20 +257,24 @@ You can **edit a component**:
257257

258258
## [Swapping components](#swapping-components)
259259

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.
261261

262262
**Method 1**:
263263

264264
1. Go to the **Components tab**.
265265
2. Find the required component and click <embed type="image/svg+xml" alt="swap_components" src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/FwHiX5HVcE23ZwIlDilhyw.svg" width="16" />
266266
next to it:
267-
<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/components_swap_tab.png" height="auto"><source src="/public/components_swap_tab.mp4" type="video/mp4"></video>
267+
268268

269269
**Method 2**:
270270

271-
1. Open the **component state menu** in the **Component** section of the right panel.
272-
2. Select the required category and component state.
273-
<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/components_swap_rightpanel.png" height="auto"><source src="/public/components_swap_rightpanel.mp4" type="video/mp4"></video>
271+
1. In the right panel, open the Component list.
272+
2. Select the required component (and its state).
273+
274+
The video below shows both these merthods.
275+
276+
<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/component_switching_ph.png" height="auto"><source src="/public/copmonent_switching.mp4" type="video/mp4"></video>
277+
274278

275279

276280
#### Deleting components
@@ -282,53 +286,31 @@ When you delete a component, all of its instances turn into frames.
282286

283287
## [Managing instances](#managing-instances)
284288

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:
295-
296-
<embed type="image/svg+xml" alt="rightpanel_instance" src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/zztZgnyr9EqhG8-NFu-_hA.svg" width="844" />
297-
298-
#### Component state menu
299-
300-
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
305289

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
307291

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:
317293

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.
319296

320-
#### Component type
297+
See the video in the [Reusing components](#reusing-components) section.
321298

322-
See the corresponding [main component property](#main-component-properties).
299+
### Instance properties
323300

324-
Once you modify an instance, the <embed type="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 section that looks like this:
325302

326-
<embed type="image/svg+xml" alt="instance_reset_overrides" src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/5lHhTwB-kkq7WL8ZYDn_QQ.svg" width="844" />
303+
<embed type="image/svg+xml" alt="instance_properties" src="https://cdn-eu.icons8.com/docs/Dko8QE6mZ06fz2gAGGUBbA/smJwPS7NKUexrqNTb-1Sxg.svg" />
327304

328-
Click it to **reset the override** and revert the instance back to the style of the component.
329305

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.
330312

331-
## Creating overrides
313+
## Overrides
332314

333315
To reiterate, an override is any edit you make to a component instance. Let's go over them in detail.
334316

@@ -338,11 +320,11 @@ Click `▾` next to the title of a component instance in the Layer list to expan
338320

339321
Some basic overrides you can make are changes to layer color, text, or image content.
340322

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**.
342324

343325
<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/creating_simple_overrides.png" height="auto"><source src="/public/creating_simple_overrides.mp4" type="video/mp4"></video>
344326

345-
You can easily reset all of these overrides by pressing <embed type="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 <embed type="image/svg+xml" alt="reset_overrides" src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/PmMyhR72A0GyShZvh91lgA.svg" width="16" > in the instance properties.
346328

347329
Here’s a full list of layers and properties you can create overrides for:
348330

@@ -353,6 +335,8 @@ Here’s a full list of layers and properties you can create overrides for:
353335
- Tints
354336
- Hotspots
355337

338+
<!--
339+
356340
#### Understanding overrides
357341
358342
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:
464448
<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/component_auto_layout_main.png" height="auto"><source src="/public/component_auto_layout_main.mp4" type="video/mp4"></video>
465449
466450
451+
-->
452+
467453
## Component-related shortcuts and menu options
468454

469455
To recap, here’s a list of context menu options and shortcuts you can use to work with components, along with corresponding shortcuts, if available.
190 KB
Loading
644 KB
Binary file not shown.

0 commit comments

Comments
 (0)