Skip to content

Commit 5a93ed0

Browse files
committed
draft
Signed-off-by: Zihan Kuang <zihan_kuang@outlook.com>
1 parent 3514638 commit 5a93ed0

1 file changed

Lines changed: 97 additions & 0 deletions

File tree

  • content/en/kanvas/designer/understanding-edges
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
title: Understanding Edge Styles
3+
description: >
4+
Learn how to interpret and customize the different types of edges in Kanvas to represent relationships between components in your infrastructure designs.
5+
weight: 2
6+
categories: [Designer]
7+
tags: [designs]
8+
---
9+
10+
When you connect components in [Kanvas](https://kanvas.new/), the line you draw is called an **edge**. Each edge visually represents a [relationship]({https://docs.meshery.io/concepts/logical/relationships) between your components. Understanding how to style these edges is key to creating clear and effective infrastructure diagrams.
11+
12+
## Semantic vs. Non-semantic Edges
13+
14+
Edges in Kanvas fall into two fundamental categories, distinguished by whether they have a built-in meaning that the system can act upon.
15+
16+
- **Semantic (Orchestratable) Edges**: These represent real infrastructure relationships that Kanvas understands, such as network links or volume mounts. Kanvas can use this information during deployment.
17+
18+
- **Non-semantic (Annotation-Only) Edges**: These are purely for your visual and organizational aid. They help you document designs and illustrate concepts but are ignored by Kanvas during deployment.
19+
20+
## System Default Styles: The Visual Language of Kanvas
21+
22+
To provide a consistent and recognizable visual language, Kanvas uses a specific, minimal set of styles for edges that are created by default. These styles give you immediate, at-a-glance information about an edge's nature.
23+
24+
| For this Relationship... | Kanvas Uses this Style... | Meaning |
25+
| :--- | :--- | :--- |
26+
| **Semantic Relationship**<br>(e.g., `Edge-Network`, `Edge-Mount`) | A **Dotted Line** with a standard **Arrowhead**. | This signifies a logical or dynamic connection that is managed by the system. The default color is typically blue or white. |
27+
| **Non-semantic Annotation** | A **Solid Line** with a standard **Arrowhead**. | This signifies a direct visual note created by the user. The default color is a distinct **Green/Teal** to visually separate it from semantic edges. |
28+
29+
These defaults serve as a community convention, but as you'll see next, you have the power to change them.
30+
31+
## Customizing Your Edges: The Full Styling Toolkit
32+
33+
A key principle in Kanvas is flexibility. **All edges, whether semantic or non-semantic, support a rich set of visual customizations.** Simply select any edge on the canvas to reveal the floating styling toolbar.
34+
35+
From here, you can override the defaults and tailor the appearance of any edge to fit your needs.
36+
37+
### 1. Line Style
38+
39+
Controls the edge's shape and pattern.
40+
41+
- **Basic Styles**:(系统默认的样式通常是这两种)
42+
- `Solid Line` - **Recommended for**: Direct visual annotations (the default for annotations).
43+
- `Dotted Line` - **Recommended for**: Standard semantic relationships (the default for semantic edges).
44+
45+
我们还有
46+
- `Dashed Line` - **Recommended for**: Indicating a proposed or optional connection.
47+
48+
这些是系统中很少看到,但是提供你自定义的:
49+
- **Advanced Shapes**:
50+
- `Zigzag Line` - **Recommended for**: Showing indirect paths that need to avoid other components.
51+
- `Wave Line` - **Recommended for**: Representing a flexible or non-critical connection.
52+
- `Bezier Curve` - **Recommended for**: Creating smooth, aesthetically pleasing layouts.
53+
- `Line with Circles` - **Recommended for**: Highlighting specific points or stages along a path.
54+
55+
### 2. Endpoint Style
56+
57+
While Kanvas defaults to a simple arrowhead, you can choose from a variety of endpoint styles for your custom diagrams.
58+
59+
| Style | Recommended Use Case |
60+
| :--- | :--- |
61+
| `Arrowhead` (Default) | Clearly shows the direction of flow or dependency. |
62+
63+
提供自定义的样式:
64+
| `Filled Diamond` | Can represent decision points or conditional flows. |
65+
| `Filled Square` | Useful for termination points or specific API interfaces. |
66+
| `Filled Triangle` | A strong alternative for indicating direction. |
67+
68+
### 3. Color Coding
69+
70+
The color tool is perfect for creating your own visual language. Use it to categorize connections or draw attention to specific parts of your design.
71+
72+
**Suggested Color Palette**:
73+
| Color | Suggested Meaning |
74+
| :--- | :--- |
75+
| **Green** | Approved, active, or successfully deployed paths. |
76+
| **Blue/White** | Standard documentation or default state. |
77+
78+
| **Yellow** | Connections with warnings or those that require review. |
79+
| **Red** | Requires attention, a known issue, or a breaking change. |
80+
81+
### 4. Labels and Annotations
82+
83+
The rename tool lets you add descriptive text directly on the edge, which is a powerful way to document your design.
84+
85+
**Examples**:
86+
- Describe traffic flow: `"User Traffic → API Gateway"`
87+
- Add process steps: `"Requires Manual Review"`
88+
- Note important details: `"Backup Route (Low Priority)"`
89+
- Specify protocols: `"gRPC / 50051"`
90+
91+
### 5. Visual Effects
92+
93+
The "Marching-ants" effect adds an animated stroke to your edge.
94+
95+
**Best For**:
96+
- Drawing attention to a critical path during a presentation or demo.
97+
- Highlighting the exact edge you are discussing in a team review.

0 commit comments

Comments
 (0)