Loading effect…
Loading preview…
backgrounds · react · free · media preview
Sample: free + media preview — thumbnail only; no public live JS bundle.
"use client";
import { useEffect, useState, type CSSProperties } from "react";
type WaveStripProps = {
className?: string;
height?: number;
};
export function WaveStrip({ className, height = 64 }: WaveStripProps) {
const [reduceMotion, setReduceMotion] = useState(false);
useEffect(() => {
const media = window.matchMedia("(prefers-reduced-motion: reduce)");
const sync = () => setReduceMotion(media.matches);
sync();
media.addEventListener("change", sync);
return () => media.removeEventListener("change", sync);
}, []);
Sample case: pricing: free + previewMode: media
Catalog shows the thumbnail only. This effect is not registered in the public preview app map, so src/ never ships as live JS.
import { WaveStrip } from "./WaveStrip";
export function Example() {
return <WaveStrip height={72} />;
}