Circular Waveform
A customizable circular audio waveform visualization component.
Animate a circular waveform, often used for audio visualizations.
Installation
CLI
COMING SOON
Installation via npx shadcnui install clipkittt@circular-waveform
isn't quite ready yet.
For now, please follow the manual installation instructions.
Eventually users will be able to run the following command:
The GitHub task can be found here.
Manual
Create a new file, for example, at src/components/circular-waveform.tsx
(or your preferred location) and paste the following code into it.
Usage
Once the CircularWaveform
component is added to your project (either via CLI or Manually), you can integrate it into your Remotion project by importing it and defining a Composition
.
Prerequisite
Ensure you have a Remotion project set up. If not, please refer to the Remotion documentation to get started.
Define a Composition:
In your Remotion project's entry file (commonly src/Root.tsx
or src/index.ts
), import CircularWaveform
and define a Composition
.
API Reference
The component exported as CircularWaveform
(e.g., from apps/docs/registry/default/ui/circular-waveform.tsx
or your project's component path) accepts the following props to customize its appearance and animation:
Prop | Type | Default Value | Description |
---|---|---|---|
barCount | number | 60 | Number of bars (lines) in the waveform. |
barWidth | number | 5 | Width (strokeWidth) of each bar in pixels. |
barColor | string | "white" | Color of the bars. Accepts any valid CSS color value. |
waveAmplitude | number | 50 | Maximum length extension of the wave bars from the base radius. |
waveSpeed | number | 10 | Speed of the wave animation. Higher value means slower animation. |
randomness | number | 30 | Amount of random length variation applied to each bar. Set to 0 for no randomness. |
radius | number | 100 | Radius of the base circle from which waveform bars extend. |
centerOffset | { x?: number; y?: number } | { x: 0, y: 0 } | Offsets the center of the circular waveform from the center of its container. Useful for precise positioning. |
height | string | number | Video config height | Explicit height for the waveform container. Overrides video config height. |
width | string | number | Video config width | Explicit width for the waveform container. Overrides video config width. |
containerStyle | React.CSSProperties | {} | Custom CSS styles for the main container div . |
barStyle | React.CSSProperties | {} | Custom CSS styles for individual bars (SVG <line> elements). Applied to each bar. |