Charcoal UI

Refine Frame

A media frame that steps an image through generation stages, from noise to sketch to colour to sharp, at a fixed size so nothing on the page shifts.

Examples

Refine Frame

API reference

PropTypeDefaultDescription
src / altstring—
stageTimenumber1.4
loopbooleantrue
rationumber4/3

About Refine Frame

Refine Frame shows an image arriving the way generated images do: from noise, to a rough sketch, to colour, to sharp. It holds a fixed size the whole time, so nothing around it shifts.

Refine Frame is an AI interface component for React 19, styled with Tailwind CSS 4 and animated with Motion. It drops into Next.js, Vite, Remix or Astro through the shadcn CLI as a single file you own.

When to use Refine Frame

  • AI image generation interfaces.
  • Loading states for heavy images.
  • Product demos of creative tools.
  • Before and after storytelling.

How it works

Stages are layered filters on the same image, crossfaded on a timer you set, with an optional loop. The stage name is announced politely, and reduced motion shows the finished image straight away.

Streaming and status changes go through live regions, every action is a labelled button that works from the keyboard, and decorative motion stops for people who prefer reduced motion. With prefers-reduced-motion on, it holds still or settles instantly instead of animating.

Customizing Refine Frame

Every prop is documented in the API reference above with its type and default. The ones you will reach for first are listed here.

The Customize panel next to the preview lets you change stageTime live, and the Code tab updates to match, so the snippet you copy already carries your values.

  • src / alt (string).
  • stageTime (number, default 1.4).
  • loop (boolean, default true).
  • ratio (number, default 4/3).

Goes well with Refine Frame

These ai pieces share its tokens and motion language, so they sit together on one page without clashing.

  • Typing Indicator: A React typing indicator: a bubble with rippling dots that tells screen readers who is typing
  • Thinking Orb: A React AI thinking orb with nine motions for nine kinds of busy
  • AI Prompt Input: An animated React AI chat input: growing field, attachments, model picker and a stop button
  • Voice Input: A React voice input: the mic expands into a live waveform with a timer and cancel
  • Message Scroller: A React chat viewport that follows streaming text and lets go when you scroll up

Install Refine Frame

npx shadcn@latest add @charcoal/refine-frame

Refine Frame is part of Charcoal UI Pro. One seat unlocks all 393 Pro components, 112 landing-page sections and 100 full templates, for every personal and client project, with updates included. Add the @charcoal registry once with your access token, then the command above copies refine-frame.tsx into components/ui and installs clsx, tailwind-merge.

You own the file you install: no runtime package, no lock-in, nothing to keep in sync. Change it however your product needs.

See Charcoal UI Pro pricing · Pro setup

Frequently asked questions

How do I install Refine Frame?
Refine Frame is part of Charcoal UI Pro. Add the @charcoal registry to components.json with your access token, then run npx shadcn@latest add @charcoal/refine-frame. It copies refine-frame.tsx into components/ui and installs motion, clsx, tailwind-merge.
Is Refine Frame free for commercial use?
Refine Frame needs a Charcoal UI Pro seat, monthly or a one-time lifetime price. A seat covers unlimited personal and commercial projects, including client work, and every future Pro component.
Does Refine Frame work with Next.js?
Yes. It is a client component for React 19 styled with Tailwind CSS 4, so it works in the Next.js App Router and Pages Router, Vite, Remix and Astro.
Can an AI coding agent install Refine Frame?
Yes. Connect the Charcoal UI MCP server (https://charcoalui.com/mcp) to Claude Code, Cursor or any MCP client; get_component returns Refine Frame's props and get_install_command returns the exact command.

Refine Frame as Markdown · llms.txt