BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/remotionui/fade-out

fade-out

remotionui/fade-out
FreeComponent

Held exit that accelerates away, timed to the last frame of its sequence by default

Live preview

live · rendered by the registry
Rendered by remotionui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://remotionui.com/r/fade-out.json

Source

registry/bases/default/primitives/fade-out.tsxremotionui.com/r/fade-out.json
1import type { CSSProperties, ReactNode } from "react";
2import { interpolate, useCurrentFrame, useVideoConfig } from "remotion";
3import { MotionWrapper } from "@/remotion/lib/motion-wrapper";
4import { EASING_EXIT } from "@/remotion/lib/timing";
5
6export type FadeOutProps = {
7 children: ReactNode;
8 /** Length of the fade in frames. */
9 durationInFrames?: number;
10 /**
11 * Frame the fade starts on. Left out, it lands on the last frame of the
12 * surrounding `<Sequence>` — the usual intent, and one less number to keep
13 * in sync when the window changes.
14 */
15 delayInFrames?: number;
16 /** Opacity it holds before the fade. */
17 from?: number;
18 /** Opacity it ends on. */
19 to?: number;
20 block?: boolean;
21 style?: CSSProperties;
22 className?: string;
23};
24
25/**
26 * Holds, then leaves on an ease-in curve — an exit accelerates away, it never
27 * decelerates into nothing.
28 */
29export const FadeOut: React.FC<FadeOutProps> = ({
30 children,
31 durationInFrames = 30,
32 delayInFrames,
33 from = 1,
34 to = 0,
35 block,
36 style,
37 className,
38}) => {
39 const frame = useCurrentFrame();
40 const { durationInFrames: windowFrames } = useVideoConfig();
41
42 const duration = Math.max(1, Math.round(durationInFrames));
43 const start =
44 delayInFrames ??
45 (Number.isFinite(windowFrames) ? Math.max(0, windowFrames - duration) : 0);
46
47 const opacity = interpolate(frame, [start, start + duration], [from, to], {
48 easing: EASING_EXIT,
49 extrapolateLeft: "clamp",
50 extrapolateRight: "clamp",
51 });
52
53 return (
54 <MotionWrapper block={block} className={className} style={{ ...style, opacity }}>
55 {children}
56 </MotionWrapper>
57 );
58};

Facts

Registry
remotionui
Type
registry:ui
Access
Free
Files written
0
Licence
MIT
First indexed
2026-08-07
Last confirmed
3 days ago

Go to the source

Docs on remotionui remotionui.com riaz37/remotion-ui on GitHub Raw registry item This item as JSON

More from remotionui

All 127 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
audio-pulseaudio-pulseremotionuiComponentsFreeno deps
audiogram-barsaudiogram-barsremotionuiComponentsFreeno deps
blur-focus-inblur-focus-inremotionuiComponentsFreeno deps
blur-inblur-inremotionuiComponentsFreeno deps
blur-revealblur-revealremotionuiComponentsFreeno deps
caption-highlightcaption-highlightremotionuiComponentsFreeno deps
chromatic-aberration-wipechromatic-aberration-wiperemotionuiComponentsFreeno deps
confetti-burstconfetti-burstremotionuiComponentsFreeno deps
BlockDex

Built by

Kynth Studios

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studios

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studios

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex