Files
everything-claude-code/docs/ja-JP/skills/remotion-video-creation/rules/lottie.md
T
Claude 174e31b3fc feat(ja-JP): add skill sub-reference translations (angular, remotion, etc.)
Translated 85 skill sub-reference files to achieve full parity with
the English source:

- skills/angular-developer/references/ — 35 files (all references)
- skills/remotion-video-creation/rules/ — 28 files (all rules)
- skills/tinystruct-patterns/references/ — 5 files
- skills/openclaw-persona-forge/references/ — 6 files
- skills/skill-comply/prompts/ — 3 files
- skills/lead-intelligence/agents/ — 4 files
- skills/brand-voice/references/ — 1 file
- skills/frontend-slides/ — 2 files
- hooks/memory-persistence/README.md — 1 file

English source parity: 0 missing files (excluding rules/zh/, internal
docs, and experimental examples absent from zh-CN)
2026-05-18 06:15:26 +09:00

2.1 KiB

name, description, metadata
name description metadata
lottie RemotionにLottieアニメーションを埋め込む。
category
Animation

RemotionでLottieアニメーションを使用する

前提条件

まず、@remotion/lottieパッケージをインストールする必要があります。 インストールされていない場合は、以下のコマンドを使用します:

npx remotion add @remotion/lottie # npmを使うプロジェクト
bunx remotion add @remotion/lottie # bunを使うプロジェクト
yarn remotion add @remotion/lottie # yarnを使うプロジェクト
pnpm exec remotion add @remotion/lottie # pnpmを使うプロジェクト

Lottieファイルの表示

Lottieアニメーションをインポートするには:

  • Lottieアセットをフェッチする
  • 読み込みプロセスを delayRender()continueRender() でラップする
  • アニメーションデータをstateに保存する
  • @remotion/lottie パッケージの Lottie コンポーネントを使ってLottieアニメーションをレンダリングする
import {Lottie, LottieAnimationData} from '@remotion/lottie';
import {useEffect, useState} from 'react';
import {cancelRender, continueRender, delayRender} from 'remotion';

export const MyAnimation = () => {
  const [handle] = useState(() => delayRender('Loading Lottie animation'));

  const [animationData, setAnimationData] = useState<LottieAnimationData | null>(null);

  useEffect(() => {
    fetch('https://assets4.lottiefiles.com/packages/lf20_zyquagfl.json')
      .then((data) => data.json())
      .then((json) => {
        setAnimationData(json);
        continueRender(handle);
      })
      .catch((err) => {
        cancelRender(err);
      });
  }, [handle]);

  if (!animationData) {
    return null;
  }

  return <Lottie animationData={animationData} />;
};

スタイリングとアニメーション

Lottieはスタイルとアニメーションを適用するための style プロパティをサポートしています:

return <Lottie animationData={animationData} style={{width: 400, height: 400}} />;