Skip to content

🎥 Make videos programmatically with React

support classname in sequence

Jonny Burger2719621c2597
diff --git a/packages/core/src/Sequence.tsx b/packages/core/src/Sequence.tsx
index 6c4e92f709..8d1ce0fe20 100644
--- a/packages/core/src/Sequence.tsx
+++ b/packages/core/src/Sequence.tsx
@@ -31,6 +31,7 @@ export type LayoutAndStyle =
| {
layout?: 'absolute-fill';
style?: React.CSSProperties;
+ className?: string;
};
export type SequenceProps = {
@@ -203,8 +204,12 @@ const SequenceRefForwardingFunction: React.ForwardRefRenderFunction<
return (
<SequenceContext.Provider value={contextValue}>
- {content === null ? null : layout === 'absolute-fill' ? (
- <AbsoluteFill ref={ref} style={defaultStyle}>
+ {content === null ? null : other.layout === 'absolute-fill' ? (
+ <AbsoluteFill
+ ref={ref}
+ style={defaultStyle}
+ className={other.className}
+ >
{content}
</AbsoluteFill>
) : (
diff --git a/packages/docs/docs/sequence.md b/packages/docs/docs/sequence.md
index 047e2ac1aa..9195677c53 100644
--- a/packages/docs/docs/sequence.md
+++ b/packages/docs/docs/sequence.md
@@ -75,12 +75,18 @@ _optional_
Either `"absolute-fill"` _(default)_ or `"none"` By default, your sequences will be absolutely positioned, so they will overlay each other. If you would like to opt out of it and handle layouting yourself, pass `layout="none"`. Available since v1.4.
-### `style`
+### `style` <AvailableFrom v="3.0.27"/>
_optional_
CSS styles to be applied to the container. If `layout` is set to `none`, there is no container and setting this style is not allowed.
+### `className` <AvailableFrom v="3.3.45"/>
+
+_optional_
+
+A class name to be applied to the container. If `layout` is set to `none`, there is no container and setting this style is not allowed.
+
## Cascading
You can nest sequences within each other and they will cascade.
diff --git a/packages/docs/docs/series.md b/packages/docs/docs/series.md
index feb16a9e41..2314f6b874 100644
--- a/packages/docs/docs/series.md
+++ b/packages/docs/docs/series.md
@@ -73,12 +73,18 @@ _optional_
Either `"absolute-fill"` _(default)_ or `"none"` By default, your sequences will be absolutely positioned, so they will overlay each other. If you would like to opt out of it and handle layouting yourself, pass `layout="none"`.
-### `style`
+### `style` <AvailableFrom v="3.3.4"/>
-_optional, available from v3.3.4_
+_optional_
CSS styles to be applied to the container. If `layout` is set to `none`, there is no container and setting this style is not allowed.
+### `className` <AvailableFrom v="3.3.45"/>
+
+_optional_
+
+A class name to be applied to the container. If `layout` is set to `none`, there is no container and setting this style is not allowed.
+
### `ref` <AvailableFrom v="3.3.4" />
_optional_