Border Beam
A decorative beam that travels around the border of any positioned container.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
count | number | 1 | Number of beams distributed evenly around the perimeter. |
side | BorderBeamSide | all | Border followed by the beam. all loops around the perimeter; one edge moves forward then backward. |
reverse | boolean | false | Sends the beams around the perimeter in the opposite direction. |
paused | boolean | false | Freezes the beams at their current positions. |
CSS parts
Shadow DOM styling hooks used with ::part(name). Prefer CSS custom properties when they cover the change.
| Name | Description |
|---|---|
beam | Each animated gradient beam. |
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-border-beam--outset | pixel | 0px | Distance between the beam layer and the container edge. |
--c2-border-beam--z-index | integer | 1 | Stacking level of the decorative overlay. |
--c2-border-beam__beam--size | pixel | 100px | Length of the visible highlight. |
--c2-border-beam__beam--width | pixel | 1px | Width of the border channel that reveals the beam. |
--c2-border-beam__beam--radius | border-radius | 12px | Corner radius of the motion path. |
--c2-border-beam__beam--color-from | color | #0265dc | Leading gradient colour. |
--c2-border-beam__beam--color-to | color | #60a5fa | Trailing gradient colour. |
--c2-border-beam__beam--opacity | opacity | 0.95 | Opacity of each beam. |
--c2-border-beam__beam--filter | filter | drop-shadow(0 0 3px rgba(2, 101, 220, 0.35)) | Glow or other filter applied to each beam. |
--c2-border-beam__beam--duration | time | 6s | Time taken to travel once around the perimeter. |
--c2-border-beam__beam--delay | time | 0s | Delay before animation; a negative value starts partway around. |