Skip to content

Commit be8aea2

Browse files
committed
edits to rns and components
1 parent 496092e commit be8aea2

File tree

8 files changed

+57
-24
lines changed

8 files changed

+57
-24
lines changed

docs/components.md

Lines changed: 53 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ These are the basic terms related to components and their functions:
4040

4141
* **Component page**. A dedicated document page used for storing main components. Lunacy adds it automatically when you create a component.
4242

43+
<div class="callout callout--info">
44+
<p><strong>Note:</strong> Starting from v.12, the Component page appears only in two cases and only in local files:</p>
45+
<ul>
46+
<li>When you copy a component from another file to a local file</li>
47+
<li>When you drop on the canvas an element from the GUI tool (button, checkbox, etc.)</li>
48+
</ul>
49+
</div>
50+
4351
* **Component state**. Components from the same category or subcategory are called **component states**. They define the different styles for one component.
4452

4553
* **Nested components**. You can nest several components in a more complex component. This gives you the most freedom and flexibility in editing your designs, and it’s an even more powerful feature when coupled with <a href="https://lunacy.docs.icons8.com/autolayout/#nested-auto-layouts" target="_blank">nested auto layouts</a>.
@@ -48,12 +56,12 @@ These are the basic terms related to components and their functions:
4856

4957
To **create a component**:
5058

51-
1. Select the layer you want to convert into a component.
52-
2. Click `+` in the **Component** section of the right panel or press `Ctrl + Alt + K` / `⌘ + ⌥ + K`.
59+
1. Select the element you want to convert into a component.
60+
2. Click <embed type="image/svg+xml" alt="go_to_main" src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/0yVpQqG2_kmdN0fYegHJ4g.svg" width="16" /> in the context toolbar at the top of the canvas or press `Ctrl + Alt + K` / `⌘ + ⌥ + K`.
5361

54-
<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/creating_components_methods.png" height="auto"><source src="/public/creating_components_methods.mp4" type="video/mp4"></video>
62+
<embed type="image/svg+xml" alt="creating_component" src="https://cdn-eu.icons8.com/docs/Dko8QE6mZ06fz2gAGGUBbA/hRtUIR33v0uSHlyfeTDbqA.svg" />
5563

56-
You can also select a layer and click <embed type="image/svg+xml" alt="go_to_main" src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/0yVpQqG2_kmdN0fYegHJ4g.svg" width="16" /> in the context toolbar at the top of the canvas or select the **Create component** option on the context menu.
64+
<!--
5765
5866
#### Layers vs. Frames
5967
@@ -67,23 +75,31 @@ The difference is shown here:
6775
6876
Find out more about [component pages](#components-page).
6977
78+
-->
79+
7080
#### Components and instances in the Layer list
7181

72-
<embed type="image/svg+xml" alt="components_instances_in_layer_list" src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/f8iTdn1orUiVLyZVImJClg.svg" width="844" />
82+
<embed type="image/svg+xml" alt="Components_in_layer_list" src="https://cdn-eu.icons8.com/docs/Dko8QE6mZ06fz2gAGGUBbA/-kkur9FADkmKjIa6O0cOBg.svg" />
83+
84+
85+
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.
7386

74-
Main components are bold and colored pink (<embed type="image/svg+xml" alt="color_code_F15085" src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/b6VBjbQ0FEaLpb01JY4uEw.svg" width="12" />) 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.
87+
Main components with more than one [state](#component-states) come with a dashed border around the symbol.
7588

7689
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.
7790

7891
## [Reusing components](reusing-components)
7992

8093
All the components in your document appear in the **Components tab** in the left panel.
8194

82-
To **add a component instance** to the canvas, drag it from the left panel to where you want to place it:
95+
To **add a component instance** to the canvas, you can:
8396

84-
<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/reusing_components_left_panel.png" height="auto"><source src="/public/reusing_components_left_panel.mp4" type="video/mp4"></video>
97+
- Drag it from the **Components tab** to where you want to place it.
98+
- Duplicate the existing instance on the canvas.
8599

86-
Right-click a component in the left panel to bring up the context menu with these options:
100+
<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/adding_components_ph.png" height="auto"><source src="/public/adding_copmonents.mp4" type="video/mp4"></video>
101+
102+
Right-click a component in the **Components tab** to bring up the context menu with these options:
87103

88104
- Rename component
89105
- Edit component
@@ -93,7 +109,13 @@ Right-click a component in the left panel to bring up the context menu with thes
93109
- Expand all
94110
- Collapse all
95111

96-
<div class="callout callout--info"> <p><strong>Note:</strong> If you used any components from built-in or manually created <a href="https://lunacy.docs.icons8.com/libraries/#ui-kits" target="_blank">UI kits</a>, they will also appear in the Components tab.</p> </div>
112+
<embed type="image/svg+xml" alt="components_conext_menu" src="https://cdn-eu.icons8.com/docs/Dko8QE6mZ06fz2gAGGUBbA/eML-tlBOk0aTrB6E2O7xiA.svg" />
113+
114+
115+
<div class="callout callout--info"> <p><strong>Note:</strong> If you created any elements using the <a href="https://lunacy.docs.icons8.com/tools/#gui-tool" target="_blank">GUI tool</a>, they will also appear in the <b>Components tab</b> in the group named <b>Web</b>.</p> </div>
116+
117+
118+
<!--
97119
98120
## [Managing components](managing-components)
99121
@@ -134,39 +156,49 @@ You can use **Components page** that Lunacy generates automatically to store all
134156
135157
<div class="callout callout--info"> <p><strong>Note:</strong> If you set one of your pages as a Components page, make sure its primary purpose is to store components. You’ll avoid confusion, and it will be easier to organize all of your design elements.</p> </div>
136158
159+
-->
160+
137161
## [Component states](#component-states)
138162

139-
You can create several **states** for a component and switch between them as needed in the **right panel**.
163+
You can create multiple states for a component and switch between them as needed. States let you define variations like *Default*, *Hover*, or *Pressed*.
140164

141165
To **create a component state**:
142166

143-
1. Select a component instance.
144-
2. Click `+` in the **Component** section of the **right panel** or press `Ctrl + Alt + P` / `⌘ + ⌥ + P`.
145-
3. Adjust your component for the new state and name it.
146-
4. Click on any empty area on the canvas.
167+
1. Select a component.
168+
2. Click <embed type="image/svg+xml" alt="Add New" src="https://cdn-eu.icons8.com/docs/Dko8QE6mZ06fz2gAGGUBbA/xeqQWIYNtUePMxnmkm1vMA.svg" /> in the context tool bar or press `Ctrl + Alt + P` / `⌘ + ⌥ + P`. A dashed frame will appear around the component, and the new state will be added below the original.
169+
3. Make the required changes to the new state.
170+
4. To create additional states, select the original component or any existing state and click `+` again.
171+
172+
173+
Lunacy automatically assigns names to states (Default, Hover, Pressed, etc.).
174+
175+
To **rename a state**:
176+
177+
1. Select the state.
178+
2. Press F2 and the new state name after the slash (for example, `Button / Hover` > `Button / Disabled`).
147179

148-
<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/creating_component_state.png" height="auto"><source src="/public/creating_component_state.mp4" type="video/mp4"></video>
180+
**Alternative workflow**
149181

150-
A new component will appear near the default main component, defining the new component state.
182+
You can also create a new component state from any instance on the canvas.
151183

152-
Lunacy also changes the name of components when you create new states, automatically placing them into [categories](#organizing-components). You can edit categories anytime in the **Components tab**.
184+
See both methods in the video below.
153185

154-
New component states for a distinct component will be displayed in the right panel as you select the component’s instances.
186+
<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/component_states_ph.png" height="auto"><source src="/public/copmonent_states.mp4" type="video/mp4"></video>
155187

156188
To **switch through component states**:
157189

158190
1. Select a component instance.
159191
2. Choose the new component state in the **right panel**.
160192

161-
<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/switching-component_state.png" height="auto"><source src="/public/switching-component_state.mp4" type="video/mp4"></video>
193+
<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/swtiching_component_states_ph.png" height="auto"><source src="/public/swtiching_copmonent_states.mp4" type="video/mp4"></video>
162194

163195
<div class="callout callout--info"> <p><strong>Note:</strong> Switching component states doesn’t affect overrides. This means that if you change the component state for an instance with overrides, the overrides you created will stay unchanged.</p> </div>
164196

165197
## Organizing components
166198

167199
As your document grows along with the number of components in it, you'll probably want to organize them so you can quickly find the necessary component when you need it.
168200

169-
This is how componenet categories and subcategories appear in the **Components tab**:
201+
This is how component categories and subcategories appear in the **Components tab**:
170202

171203
<embed type="image/svg+xml" alt="categories_components" src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/TDamndg4PkCuDPWyD2wrEQ.svg" width="844" />
172204

200 KB
Loading

docs/public/adding_copmonents.mp4

1.18 MB
Binary file not shown.
190 KB
Loading

docs/public/copmonent_states.mp4

1.87 MB
Binary file not shown.
202 KB
Loading
410 KB
Binary file not shown.

docs/release-notes.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,12 @@ The web version is coming soon. Follow us on [X](https://x.com/Icons8_Lunacy) (e
107107
### New zooming and panning options
108108
The zoom control in the top-right corner now includes two new features:
109109

110-
**Right Click Drag Pan** — pan the canvas by dragging while holding the right mouse button
110+
**Pan with Right Click** — pan the canvas by dragging while holding the right mouse button
111111

112-
**Scroll Wheel Zoom** — zoom the canvas using the scroll wheel without needing to hold `Ctrl` or `Cmd`
112+
**Zoom with Scroll Wheel** — zoom the canvas using the scroll wheel without needing to hold `Ctrl` or `Cmd`
113+
114+
<embed type="image/svg+xml" alt="new_zooming_options" src="https://cdn-eu.icons8.com/docs/Dko8QE6mZ06fz2gAGGUBbA/Mo3KvydXnUqpkv9lHGb-LQ.svg" />
113115

114-
<embed type="image/svg+xml" alt="new styles" src="https://cdn-eu.icons8.com/docs/Dko8QE6mZ06fz2gAGGUBbA/Mo3KvydXnUqpkv9lHGb-LQ.svg" />
115116

116117

117118
### Lower RAM usage

0 commit comments

Comments
 (0)