nextui.dev
Home
Docs
Saved
Pricing
Components37
  • Forms & inputs7
  • Cards13
  • Buttons, badges & avatars8
  • Feedback & display6
  • Effects3
Agents17
  • Chat inputNew
  • Task checklistNew
  • ReasoningNew
  • Tool callNew
  • Tool approvalNew
  • SourcesNew
  • Agent timelineNew
  • Artifact panelNew
  • Streaming messageNew
  • Conversation shellNew
  • Voice agentNew
  • Voice orbNew
  • Thinking ring
  • Thinking waveNew
  • Thinking sparkle
  • Thinking bot
  • Prompt deckNew
Blocks20
  • Agent chatNew
  • Pill heroNew
  • Grid hero
  • Moodboard generatorNew
  • Waitlist heroNew
  • Intro bannerNew
  • Creative home heroNew
  • Chat heroNew
  • App shelfNew
  • Usage card
  • Design resultsNew
  • Pricing tiers
  • Dashboard home
  • The shiftNew
  • Launch perksNew
  • Testimonials
  • Quote
  • Team
  • Leads tableNew
  • Sign in
Pages10
  • ASCII workspace$49
  • CRM overviewNew
  • Marketing dashboardNew
  • Developer portfolio$49
  • Particle landing$49
  • Particle story$49
  • Statement converter$49
  • AI photo studio$49
  • Group card launch$49
  • Month-end storyNew
Themes9
  • Default
  • Ember
  • Ocean
  • Forest
  • Grape
  • Rose
  • Amber
  • Clay
  • Brutal
Upgrade
nextui.dev

nextui components, blocks and themes you install with one command.

Product

  • Components
  • Blocks
  • Themes
  • Pricing

Resources

  • Docs
  • Roadmap
  • GitHub

Legal

  • License
  • Privacy
  • Terms
  • Refunds

nextUI

[ 200 OK ] · nextUI

© 2026 NEXTUI • All rights reserved.

Upgrade
ComponentsAI & agentsArtifact panel
Copy promptCopy prompt

Customize

File name or title in the header

Chip next to the title; leave empty to hide it

Play a scripted edit on a loop while on screen, for demos

JSX · copied with Copy prompt

<ArtifactPanel autoPlay />

Artifact panelNew

Side panel for what an AI agent made: Preview and Code tabs, a version switcher with a note per version, copy, and code that streams in while the agent writes.

Installation

Set your access key from API keys as NEXTUI_TOKEN in .env.local and add the @nextui namespace below to components.json once. Then every item installs by name. Each install counts as a copy on a free account.

$pnpm dlx shadcn@latest add @nextui/artifact-panel
1{
2 "registries": {
3 "@nextui": {
4 "url": "https://nextui.dev/r/{name}.json",
5 "headers": { "Authorization": "Bearer ${NEXTUI_TOKEN}" }
6 }
7 }
8}

Usage

1"use client";
2
3import { useState } from "react";
4import { ArtifactPanel, type ArtifactVersion } from "@/components/nextui/artifact-panel";
5
6// Keep every version the agent writes; the newest one streams while the agent is busy.
7export function Workspace({ versions, writing }: { versions: ArtifactVersion[]; writing: boolean }) {
8 const [version, setVersion] = useState<number>();
9
10 return (
11 <div className="grid gap-4 lg:grid-cols-[1fr_32rem]">
12 {/* chat on the left */}
13 <ArtifactPanel
14 title="pricing-card.tsx"
15 kind="Component"
16 versions={versions}
17 version={version ?? versions.length - 1}
18 onVersionChange={setVersion}
19 streaming={writing}
20 />
21 </div>
22 );
23}

API reference

Edit props live in the preview above, or see all 12 props
PropTypeDefaultDescription
titlestring"pricing-card.tsx"File name or title in the header
kindstring"Component"Chip next to the title; leave empty to hide it
versions{ label?: string; code: string; preview?: ReactNode; note?: string }[]–Saved versions, oldest first
versionnumber–Controlled version index
defaultVersionnumber–Starting version index; defaults to the newest
onVersionChange(index: number) => void–Called when the user steps through versions
tab"preview" | "code"–Controlled tab
defaultTab"preview" | "code""preview"Starting tab
onTabChange(tab) => void–Called when the user switches tabs
streamingbooleanfalseThe newest version's code is still arriving; shows a cursor and follows the last line
autoPlaybooleanfalsePlay a scripted edit on a loop while on screen, for demos
classNamestring–Extra classes on the wrapper

Related

All components

Chat inputNew

Task checklistNew

ReasoningNew

Sign in to see the code

Preview it freely. A free account copies code and prompts a few times a day.

Sign in