For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
/
275
Sponsor

Waveform

A vertically centered audio waveform for Open Graph images.

Customize

Installation

$ pnpm dlx shadcn@latest add @ogimagecn/waveform

Usage

import { Waveform } from "@/components/og/waveform";
<Waveform
  amplitudes={[0.15, 0.4, 0.8, 0.55, 1, 0.7, 0.25]}
  color="#a78bfa"
  height={120}
  gap={6}
/>

Pass normalized amplitudes in the order they should appear. Values outside 0–1 are clamped, negative values use their magnitude, and invalid numbers render as minimum-height bars. The waveform fills its parent's width, so give the parent an explicit width when rendering with Satori. An empty array renders an empty row.

API Reference

PropTypeDefault
amplitudesnumber[]—
colorstring#a78bfa
heightnumber96
gapnumber4