Skip to main content

Grow boundsv4.0.548

If you apply an effect to an element, it might extend beyond the element's edges and overflow.



This is where the growBounds prop on <HtmlInCanvas> comes in useful.
It increases the canvas size, but keeps the position and the coordinate system of the canvas stable, so the content doesn't move.

Interactively​

If your element is not a <HtmlInCanvas> component, wrap it first.
Then select it and increase Grow bounds:

Agentically​

Use the /remotion-markup skill to fix a clipped effect.

/remotion-markup The wave on the Continue button is getting clipped. Grow its bounds so the whole wave is visible.
Suggested prompt

Programmatic example​

Apply growBounds to a <HtmlInCanvas> component:

WaveButton.tsx
import {wave} from '@remotion/effects/wave'; import {HtmlInCanvas} from 'remotion'; export const WaveButton = () => ( <HtmlInCanvas width={420} height={112} growBounds={86} effects={[wave({amplitude: 69, wavelength: 520, direction: 'horizontal'})]} > <button style={{width: '100%', height: '100%', borderRadius: 56}}> Continue → </button> </HtmlInCanvas> );