Ghost Complete

A sentence types in an editor card, grey ghost text suggests the rest, and each suggestion fills in as accepted. A free, MIT-licensed Remotion UI block.

Installation
$ pnpm dlx shadcn@latest add @remocn/ghost-complete

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { GhostComplete } from "@/components/remocn/ghost-complete";
 
const GhostCompleteScene = () => (
  <GhostComplete
    title="Launch notes"
    typed="Ship the"
    suggestions={["launch video", "\nbefore lunch."]}
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="GhostComplete"
    component={GhostCompleteScene}
    durationInFrames={270}
    fps={60}
    width={1280}
    height={720}
  />
);

A card titled title types the typed text, then each entry in suggestions appears as grey ghost text and fills in with a Tab press. A suggestion starting with a newline continues on a second line. Pass your own typed text and suggestions; it ships light and dark through theme.

The ground is a live gradients.sh shader (GshGround), installed with the component as @remocn/gsh. Pick another look with the ground preset prop.

Props19

PropTypeDefault
title
string"Launch notes"

Title in the editor card header.

typed
string"Ship the"

Text typed before the first suggestion.

suggestions
string[]["launch video", "\nbefore lunch."]

Ghost suggestions accepted in order. A leading newline starts a new line.

keepLastFill
booleantrue

Keep the last accepted suggestion in the fill color.

showLogo
booleantrue

Show the built-in wordmark.

keyLabel
string"Tab"

Label of the key pressed to accept a suggestion.

hintLabel
string"to accept"

Text shown next to the key.

hold
number16

Frames a ghost suggestion waits before it is accepted.

logo
React.ReactNode—

Replaces the remocn mark.

theme
"dark" | "light""dark"

Color scheme. Ships light and dark.

ground
GshPresetId—

Shader preset id for the animated background.

groundParams
Partial<GradientParams>—

Partial shader parameters that override the ground preset.

background
string—

Solid fill in place of the gradient ground; pass "transparent" to drop it.

ink
string—

Text color; overrides the theme ink.

fontFamily
string"Geist"

Typeface for the copy. Load the font in your project first.

scale
number1

Size of the foreground around the frame's center; the background stays put.

delay
number0

Frames to hold the first frame before anything moves.

speed
number1

Playback speed multiplier for the whole timeline.

accent
string—

Declared but not used by the current source.

  • titlestring

    Title in the editor card header.

    Default"Launch notes"

  • typedstring

    Text typed before the first suggestion.

    Default"Ship the"

  • suggestionsstring[]

    Ghost suggestions accepted in order. A leading newline starts a new line.

    Default["launch video", "\nbefore lunch."]

  • keepLastFillboolean

    Keep the last accepted suggestion in the fill color.

    Defaulttrue

  • showLogoboolean

    Show the built-in wordmark.

    Defaulttrue

  • keyLabelstring

    Label of the key pressed to accept a suggestion.

    Default"Tab"

  • hintLabelstring

    Text shown next to the key.

    Default"to accept"

  • holdnumber

    Frames a ghost suggestion waits before it is accepted.

    Default16

  • logoReact.ReactNode

    Replaces the remocn mark.

  • theme"dark" | "light"

    Color scheme. Ships light and dark.

    Default"dark"

  • groundGshPresetId

    Shader preset id for the animated background.

  • groundParamsPartial<GradientParams>

    Partial shader parameters that override the ground preset.

  • backgroundstring

    Solid fill in place of the gradient ground; pass "transparent" to drop it.

  • inkstring

    Text color; overrides the theme ink.

  • fontFamilystring

    Typeface for the copy. Load the font in your project first.

    Default"Geist"

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • speednumber

    Playback speed multiplier for the whole timeline.

    Default1

  • accentstring

    Declared but not used by the current source.