Skip to main content

rings()v4.0.471

Part of the @remotion/effects package.

Adds concentric circular bands to canvas-based components such as <Video>, <HtmlInCanvas> and <Solid>.

It uses the same band controls as lines(), but radiates the bands from a normalized center point.

Preview​

Drag current effect onto a layer in the Studio

Example​

MyComp.tsx
import {rings} from '@remotion/effects/rings'; import {Solid, useCurrentFrame} from 'remotion'; export const MyComp: React.FC = () => { const frame = useCurrentFrame(); return ( <> <Solid width={1280} height={720} effects={[ rings({ colors: ['#9fd6ff', 'transparent'], center: [0.5, 0.5], thickness: 40, gap: 0, offset: frame * 2, }), ]} /> </> ); };

API​

Pass an object with the following properties. You can also call rings() without arguments.

colors?​

An array of color strings for the rings. Colors are assigned cyclically. Must contain at least 2 colors.

Defaults to ['#dff4ff', '#7cc6ff'].

center?​

Center of the rings, normalized from 0 to 1 in x/y. Defaults to [0.5, 0.5].

thickness?​

Thickness of each colored ring in pixels. Defaults to 40.

gap?​

Transparent gap in pixels between each ring. Defaults to 0.

With gap: 0 (the default), rings are packed solid with no gap between them.
With gap > 0, a transparent ring appears between each colored ring, allowing the source content to show through.

offset?​

Radial offset in pixels. Defaults to 0.

Animate this value with useCurrentFrame() to expand or contract the rings.

maskToSourceAlpha?v4.0.474​

Masks the generated ring pattern to the source alpha channel. Defaults to false.

Set this to true to prevent the ring pattern from appearing in fully transparent source pixels.

disabled?​

When true, the effect is skipped. Defaults to false.

Requirements​

rings() uses a WebGL2 backend. See Using WebGL and WebGPU during renders.

See also​