Imgcli

AI Chat Input

Prompt Rewrite

A prompt gets a second thought: it types, the caret selects one phrase, the selection is deleted, and a better phrase types into its place.

Make a video
Type
Animation
Duration
4.8s
Category
AI Chat Input
Source
Imgcli

Install

$ npx @imgcli/cli add prompt-rewrite

A prompt gets a second thought: it types, the caret selects one phrase, the selection is deleted, and a better phrase types into its place.

Installation

npx @imgcli/cli add prompt-rewrite

Usage

import { PromptRewrite } from "@/components/imgcli/prompt-rewrite";

<PromptRewrite
  before="Write a"
  draft="long email"
  final="brief update"
  after="for the team"
/>;

Default example: Refine a request from a long email to a brief team update. Render at 30 fps for 144 frames (4.8 seconds).

PropTypeDefaultDescription
before
string"Write a"
draft
string"long email"The phrase that gets selected and replaced.
final
string"brief update"What replaces it.
after
string"for the team"
fontSize
number30Type size in pixels on a 540px-tall canvas.
fontFamily
string—A face from the Imgcli font list, or any loaded CSS font stack.
accentColor
string—
theme
Partial<ImgcliTheme>—
mode
"light" | "dark"—
speed
number1

License

MIT. Free for personal and commercial use. Preserve the copyright and license notice.

Copyright (c) 2026 Ricky (Imgcli) <https://imgcli.com>

Frequently asked questions

How do I add Prompt Rewrite to a Remotion project?

Run npx @imgcli/cli add prompt-rewrite in your Remotion project. The CLI copies the editable source into components/imgcli/ under your source root and installs its dependencies.

What is Prompt Rewrite?

Prompt Rewrite is a Remotion prompt editing animation for React. A prompt gets a second thought: it types, the caret selects one phrase, the selection is deleted, and a better phrase types into its place.

What do I need before using Prompt Rewrite?

Use Node.js 20.19 or newer and an existing Remotion project. Create one with npx create-video@latest. The component is free and MIT licensed.