Capítulo 592 de 988

Chapter 592: linearGradient()

Core Idea

_Part of the @remotion/effects package.

Key Concepts

  • Preview
  • Example
  • API
  • start?
  • end?
  • startColor?
  • endColor?
  • disabled?

Code Examples

export const MyComp: React.FC = () => {
  return (
    <AbsoluteFill>
      <Solid
        width={1280}
        height={720}
        effects={[
          linearGradient({
            start: [0, 0.5],
            end: [1, 0.5],
            startColor: '#0b84f3',
            endColor: '#ff5c8a',
          }),
        ]}
      />
    </AbsoluteFill>
  );
};
  • What it demonstrates: Usage pattern for linearGradient() from the official docs.

Key Takeaways

  1. Understand preview when working with linearGradient().
  2. Understand example when working with linearGradient().
  3. Understand api when working with linearGradient().
  4. Understand start? when working with linearGradient().
  5. Understand end? when working with linearGradient().

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.