AI Primitives

Components / Content / Image

Image

Displays a URL, base64, or raw-bytes image, with an animated placeholder while pending.

Installation

Install the Image React component with the shadcn CLI (after adding the @ai-primitive registry and theme, see Installation):

npx shadcn@latest add @ai-primitive/image

Usage

import { Image } from "@/components/ui/image"

Related components

  • Markdown - Streaming-safe markdown renderer with GFM support and code blocks built in.
  • Response Stream - Animates text in token-by-token (typewriter) or word-by-word (fade).
  • JSX Preview - Renders a JSX string as live output, auto-closing open tags mid-stream.
  • File Upload - A drag-and-drop dropzone that overlays the whole page while a file is dragged over it.

Previous: JSX Preview · Next: File Upload