Skip to content
Sign in
VideoReference elementsMenu

Reference elementsPro

Character, object and scene references for consistent video, with tags.

ProCharacters, objects and scenes for a short film; pick what this shot keeps consistent.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/reference-elements

Usage

tsx
import { ReferenceElements } from "@/components/ui/chatcn/pro/reference-elements"

<ReferenceElements elements={elements} onElementsChange={setElements} selected={ids} onSelectedChange={setIds} onAdd={addReference} />

Each reference has a cover, its other angles, a handle to call it by in prompts (click to copy it) and tags for what must not drift. Pick up to maxSelected for the current shot; they gather in the tray. A character with one image is flagged, since a single angle lets the face wander. References still being learned or failed cannot be picked until they are ready.

Examples

States

ProA full shot, read only, loading, and an empty library.

Props

PropTypeNotes
elements, onElementsChangeReferenceElement[]{ id, kind, name, handle?, images, tags, status?, error? }
selected, defaultSelected, onSelectedChangestring[]Controlled or not
maxSelectednumberDefault 4
onAdd(kind) => voidcharacter, object or scene
onRetry(id) => voidShows Retry on failed references
loading, disabledbooleanPlaceholders, or no changes

Accessibility

  • Each cover is a toggle button named Use name in this shot; when the shot is full it says why and stays focusable.
  • Tags are a list with a remove button each; Enter or a comma adds one, Backspace on an empty field removes the last.
  • The shot count is a polite live region.