Fill Between
Visually connect and emphasize areas between elements
Introduction
Move beyond arrows — instead of just pointing at things,
fill the space between them. With \nskFillBetween
, you can create fluid,
ambient shapes that connect elements without overwhelming them. These filled
areas become a kind of visual glue: they group, guide, and suggest.
This visual overlay can help group related parts, emphasize sequential flows, or annotate areas without introducing new geometry.
Usage
Parameter Overview
Parameter | Description | Default |
---|---|---|
from | ID of the first block or coordinate | required |
to | ID of the second block or coordinate | required |
fill | Fill color between elements | transparent |
border-color | Border color of the filled area | none |
opacity | Opacity of the filled area (0 –1 ) | 1 |
edge | Determines if edges are straight or curved | straight |
orientation | Direction of filling: vertical or horizontal | vertical |
corner-offset | Offset to adjust the corner alignment (straight edge) | 0mm |
in | Inbound angle | {} |
out | Outbound angle | {} |
Examples
Straight vs. Curved Edges
Here’s an illustrative example showcasing both straight and curved fills:
Advanced Example
This advanced use case demonstrates multiple fills, annotations, and coordinate-based fills:
Best Practices
- Less is more: avoid flooding the diagram.
- Use low-opacity or brand-tinted fills to avoid visual conflict.
- Combine fills with annotations for clarity — use them to imply, not just decorate.
Key Takeaway
The \nskFillBetween
command provides an effective method to visually
emphasize regions and relationships between diagram elements, enhancing both
clarity and aesthetics with customizable fills, edges, and orientation
controls.
Reference Table
Prop | Type | Default |
---|---|---|
corner-offset? | dimension | {} |
draw? | token list | nskStrongBlue!50 |
edge? | choice | straight |
fill? | token list | nskStrongBlue!20 |
from? | token list | {} |
opacity? | number | 0.4 |
orientation? | choice | vertical |
to? | token list | {} |
in? | token list | {} |
out? | token list | {} |