ahmedmaknessi/sum-of-parts / .claude/skills/remotion-markup
remotion-markup
VerifiedContent, animation and effects best practices
motion-blur.md
View on GitHub# Motion blur
Use `@remotion/motion-blur` for frame-driven motion blur.
Install it with `npx remotion add @remotion/motion-blur`.
`<HtmlInCanvasMotionBlur>` is the state of the art in Remotion for blurring animated HTML. It captures the content at fractional frames and averages its pixels in a canvas.
## `<HtmlInCanvasMotionBlur>`
Available from Remotion 4.0.529.
Supply the canvas `width` and `height`, usually from `useVideoConfig()`.
`shutterAngle` defaults to `180` and accepts `0` to `360`.
`0` disables blur. `samples` defaults to `8` and must be an integer from `1` to `64`. More samples can smooth the blur but increase preview and render cost.
Call `useCurrentFrame()` inside the child component so each sample receives its own frame.
```tsx
import {
HtmlInCanvasMotionBlur,
} from '@remotion/motion-blur';
import {useCurrentFrame, useVideoConfig} from 'remotion';
const MovingBox = () => {
const frame = useCurrentFrame();
return (
<div
style={{
position: 'absolute',
left: frame * 10,
top: 200,
width: 120,
height: 120,
backgroundColor: '#ff6b6b',
}}
/>
);
};
export const HtmlInCanvasBlur = () => {
const {width, height} = useVideoConfig();
return (
<HtmlInCanvasMotionBlur
width={width}
height={height}
samples={8}
shutterAngle={180}
>
<MovingBox />
</HtmlInCanvasMotionBlur>
);
};
```
For live preview, enable HTML-in-canvas in Chrome 149 or later with `chrome://flags/#canvas-draw-element`.
No configuration for rendering is necessary.
Nest `<HtmlInCanvas>` or `<HtmlInCanvasMotionBlur>` components only when `HtmlInCanvas.isNestingSupported()` returns `true` (Chrome 157 or newer with HTML-in-canvas enabled).
If HTML-in-canvas is unavailable, see the [motion blur guide](https://www.remotion.dev/docs/motion-blur) for other options. See the [`<HtmlInCanvasMotionBlur>` reference](https://www.remotion.dev/docs/motion-blur/html-in-canvas-motion-blur) for API details.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |