Beam
An animated line between two elements, for data-flow and integration diagrams.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
from | string | — | id of the element the beam starts from. |
to | string | — | id of the element the beam ends at. |
curvature | number | 0 | Bend of the line, in pixels: how far the curve's control point sits from the straight line's middle. The line itself bulges about half that far. Positive values bend it to the left of the direction of travel (up for a beam running left to right), negative values to the right. |
reverse | boolean | false | Sends the light from to back to from. |
CSS parts
Shadow DOM styling hooks used with ::part(name). Prefer CSS custom properties when they cover the change.
| Name | Description |
|---|---|
track | The resting line between the two elements. |
beam | The light that travels along the line. |
CSS custom properties
Grouped by semantic target and state from --c2-<component>__<target>__<state>--<property>. Click a group to collapse it; click a name to copy it.
| Name | Type | Default | Description |
|---|---|---|---|
--c2-beam--z-index | integer | 0 | Stacking level of the connector in its container. |
--c2-beam__track--color | color | #e4e4e7 | Colour of the resting line. |
--c2-beam__track--width | pixel | 2px | Thickness of the resting line. |
--c2-beam__beam--color-from | color | #0265dc | Colour of the light near the from element. |
--c2-beam__beam--color-to | color | #60a5fa | Colour of the light near the to element. |
--c2-beam__beam--width | pixel | 2px | Thickness of the light. |
--c2-beam__beam--length | number | 20 | Length of the light as a share of the line, from 0 to 100. |
--c2-beam__beam--duration | time | 3s | Time the light takes to travel the line once. |
--c2-beam__beam--delay | time | 0s | Delay before the light starts; a negative value starts it partway along. |