Skip to content

🎥 Make videos programmatically with React

Elements: Set native dimensions on fixed-size roots

Jonny Burgera2c24b938927
diff --git a/packages/docs/elements/commerce/product-discount-callout/product-discount-callout.tsx b/packages/docs/elements/commerce/product-discount-callout/product-discount-callout.tsx
index db5cbad0fb..d658ab9eb0 100644
--- a/packages/docs/elements/commerce/product-discount-callout/product-discount-callout.tsx
+++ b/packages/docs/elements/commerce/product-discount-callout/product-discount-callout.tsx
@@ -34,11 +34,11 @@ const ProductDiscountCalloutInner: React.FC<InteractiveTransformProps> = ({
style={{
WebkitFontSmoothing: 'antialiased',
fontFamily: 'Inter',
- height: '100%',
+ height: 720,
isolation: 'isolate',
overflow: 'hidden',
position: 'relative',
- width: '100%',
+ width: 720,
...style,
}}
>
diff --git a/packages/docs/elements/data/number-counter/number-counter.tsx b/packages/docs/elements/data/number-counter/number-counter.tsx
index 5fe59560f5..eb56aa484c 100644
--- a/packages/docs/elements/data/number-counter/number-counter.tsx
+++ b/packages/docs/elements/data/number-counter/number-counter.tsx
@@ -29,8 +29,8 @@ const NumberCounterInner: React.FC<InteractiveTransformProps> = ({style}) => {
name="Container"
style={{
display: 'flex',
- width: '100%',
- height: '100%',
+ width: 640,
+ height: 200,
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'Inter',
diff --git a/packages/docs/elements/text/crossed-off/crossed-off.tsx b/packages/docs/elements/text/crossed-off/crossed-off.tsx
index df07b054b5..706e6d0cc0 100644
--- a/packages/docs/elements/text/crossed-off/crossed-off.tsx
+++ b/packages/docs/elements/text/crossed-off/crossed-off.tsx
@@ -23,7 +23,8 @@ const CrossedOffTextInner: React.FC<InteractiveTransformProps> = ({style}) => {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
- height: '100%',
+ width: 900,
+ height: 220,
fontSize: 80,
fontWeight: 700,
lineHeight: 1.1,
diff --git a/packages/docs/elements/text/strike-through/strike-through.tsx b/packages/docs/elements/text/strike-through/strike-through.tsx
index 7ba8aab81f..9df5ab6f2b 100644
--- a/packages/docs/elements/text/strike-through/strike-through.tsx
+++ b/packages/docs/elements/text/strike-through/strike-through.tsx
@@ -25,7 +25,8 @@ const StrikeThroughTextInner: React.FC<InteractiveTransformProps> = ({
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
- height: '100%',
+ width: 900,
+ height: 220,
fontSize: 80,
fontWeight: 700,
lineHeight: 1.1,
diff --git a/packages/docs/src/components/Elements/element-definitions.ts b/packages/docs/src/components/Elements/element-definitions.ts
index 76bc84fff1..24d7d8ecfb 100644
--- a/packages/docs/src/components/Elements/element-definitions.ts
+++ b/packages/docs/src/components/Elements/element-definitions.ts
@@ -568,8 +568,8 @@ const elementImplementations = [
{name: '@remotion/shapes', version: null},
],
durationInFrames: 120,
- elementHeight: 760,
- elementWidth: 760,
+ elementHeight: 720,
+ elementWidth: 720,
fps: 30,
height: 1080,
posterFrame: 57,