Shake Emphasis
A short impact shake with a decaying envelope. Install with npx remotion-ui@latest add shake-emphasis.
PrimitivePrimitives
$ npx remotion-ui@latest add shake-emphasisSomething just landed.
import { ShakeEmphasis } from "@/remotion/primitives/shake-emphasis";
<ShakeEmphasis startAtInFrames={24}>
<Headline />
</ShakeEmphasis>Noise, not a sine
A shake driven by sin(frame) is a vibration: every swing is the same size, so
it reads as a motor rather than as an impact. This samples a deterministic value
noise at frequency samples per second and smoothsteps between samples, which
gives the uneven amplitude a real hit has. The smoothstep is what keeps it from
strobing when frequency is high.
The envelope is the component
Displacement peaks on the impact frame and decays to nothing, so the element is
at rest before and after. Nothing loops by default — a shake that keeps going is
a vibration, and the emphasis is gone within half a second of the hit anyway.
Pass repeatEveryInFrames only when the shake is riding a beat.
punch compresses the element on impact and lets it overshoot past rest on the
way back. Without it the shake reads as the camera moving rather than as the
element being hit.
Timing it
An impact wants to land on a cut, a beat, or the frame a number finishes
counting. startAtInFrames is in the surrounding sequence's frame space, so
inside a <Sequence> it is relative to that sequence's start.
durationInFrames is the decay, not a hold: 12 frames is a snap, 24 is a heavy
landing, and much beyond that stops reading as an impact at all.
Value noise, not a sine: every swing is a different size, which is the difference between an impact and a motor. The envelope decays to rest, so the element is still before and after — a shake that keeps going is a vibration.
Agent notes
Install first, then import the copied source component locally. AI guide →
@/remotion/primitives/shake-emphasis- Use when: frame-level motion primitives and reusable animation wrappers.
- Customize: startAtInFrames, durationInFrames, intensity, rotation, plus copied source for timing, layout, colors, and typography.
- Rule: do not import this component from the
remotion-uinpm package; it is copied into your project.
Usage
import { ShakeEmphasis } from "@/remotion/primitives/shake-emphasis";
<ShakeEmphasis startAtInFrames={24}>
<Headline />
</ShakeEmphasis>API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | - | What gets hit. |
| startAtInFrames | number | 0 | Frame the impact lands on. |
| durationInFrames | number | 18 | How long the shake takes to die out. Impacts are short. |
| intensity | number | 16 | Peak displacement, in px. |
| rotation | number | 1.6 | Peak rotation in degrees. 3 already reads as violent. |
| punch | number | 0.05 | Scale compression on impact. 0 shakes without a hit. |
| frequency | number | 22 | Rattle rate, in shakes per second. |
| axis | "both" | "x" | "y" | "both" | Which way it moves. |
| decay | number | 2.2 | How fast the shake dies. 1 is even, 3 is a sharp hit. |
| repeatEveryInFrames | number | - | Repeat the impact on this interval. Omit for a single hit. |
| seed | number | 1 | Changes the rattle without changing any other prop. |