npx remotion elements usev4.0.542
Installs an Element from the page of an Element Library into a composition of your project.
npx remotion elements use <url>Example
npx remotion elements use https://example.com/elements/lower-third --composition MyVideoThe URL is the Element's page. The command:
- Fetches the page and reads the Element payload embedded in it
- Prints the files it will create and change, the npm packages it will install and the assets it will add
- Asks for confirmation
- Installs the missing packages with your package manager, saves the assets into the
publicfolder, writes an.element.tsxfile next to the composition's component and adds the Element to the composition.
The command inserts the Element at frame 0. If the Element has fixed dimensions and the composition's width and height are numbers, the Element is centered.
The Element's source code comes from the website and runs in your project. Install Elements only from websites you trust.
Supported URLs
The page must embed the Element payload in its HTML, or link to a JSON payload. See serializeElementPayloadForHtml().
A URL that returns a JSON payload created with createElementPayload() also works.
Flags
--composition
Select the composition by ID. Element installation uses an existing composition. A Canvas Capture or OpenTimeline import uses the ID for the new composition.
If your project has a single composition, it is used. Otherwise, the command lets you select a composition. In a non-interactive shell, it fails and lists the composition IDs.
The command finds compositions in the source code. It supports <Composition> and <Still> elements with a string id.
--element
The slug of the Element to install when the library page contains several Elements.
--yes
Skip the confirmation prompt. You can also pass -y.
In a non-interactive shell, the command fails if --yes is not passed.
--overwrite
Replace the existing .element.tsx file when its contents differ from the Element being installed. The default is false.
If the existing file has the same contents, it is reused.
--dry-runv4.0.543
Preview the files, assets, and dependencies that the command would change. The command exits before writing files or installing packages.
The preview includes the selected Element and composition and skips the confirmation prompt.
--package-managerv4.0.543
Forces a specific package manager to be used. By default, Remotion will auto-detect the package manager based on your lockfile.Acceptable values are
npm, yarn, pnpm, bun and nub.
--public-dir
Define the location of the public/ directory. If not defined, Remotion will assume the location is the public folder in your Remotion root.
--log
One of trace, verbose, info, warn, error.Determines how much info is being logged to the console.
Default
info.