Open any border, copy the HTML and CSS, and put your own content inside the box. The border is drawn with a pseudo-element, a background-clip layer or a mask, so it never changes the box's size or shifts the layout while it animates.
To change the color, set --bdr-color; gradients and glows are mixed from it. To change the size, set --bdr-size: the border width, radius and glow are in em.
Rotating gradient borders animate a registered @property angle, which every current browser supports; older ones show a still gradient border. Every snippet ships with a prefers-reduced-motion rule that stops the motion.