Capítulo 575 de 988

Chapter 575: dropShadow()

Core Idea

_Part of the @remotion/effects package.

Key Concepts

  • Preview
  • Example
  • API
  • radius?
  • offsetX?
  • offsetY?
  • opacity?
  • color?

Code Examples

export const MyComp: React.FC = () => {
  return (
    <AbsoluteFill>
      <HtmlInCanvas
        width={1280}
        height={720}
        effects={[
          dropShadow({
            radius: 24,
            offsetX: 16,
            offsetY: 16,
            opacity: 0.6,
            color: '#000000',
          }),
        ]}
      >
        <div
          style={{
            backgroundColor: 'white',
            borderRadius: 32,
            fontSize: 72,
            padding: 80,
          }}
        >
          Hello
        </div>
      </HtmlInCanvas>
    </AbsoluteFill>
  );
};
  • What it demonstrates: Usage pattern for dropShadow() from the official docs.

Key Takeaways

  1. Understand preview when working with dropShadow().
  2. Understand example when working with dropShadow().
  3. Understand api when working with dropShadow().
  4. Understand radius? when working with dropShadow().
  5. Understand offsetx? when working with dropShadow().

Connects To

  • Animated Emoji: related page in the Effects Library section.
  • get Available Emoji: related page in the Effects Library section.
  • api: related page in the Effects Library section.