Skip to content
Sign upGet access
MicrointeractionsArtifact expandMenu

Artifact expand (Pro)

ProIncluded in $99

An artifact that opens out of its message: the inline card grows into the side panel.

ProOpen the inline card and it grows into the side panel; close it and the panel shrinks back into the card.

The inline card in the conversation is the panel, small. Open it and the card grows into the side panel, travelling to its place and size while its corners and contents settle; close it and the panel shrinks back into the card. The panel fills the end side of the nearest positioned ancestor.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/artifact-expand

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { ArtifactExpand } from "@/components/ui/chatcn/pro/artifact-expand"

<main className="relative">
  <ArtifactExpand title="Pricing section" kind="React component" open={open} onOpenChange={setOpen} preview={<Thumb />}>
    <PricingSection />
  </ArtifactExpand>
</main>

Props

PropTypeNotes
title / kindstring
open / onOpenChangeboolean
previewReactNodeInside the inline card
childrenReactNodeThe artifact, in the panel

Keyboard

KeyAction
EscapeClose the panel

Accessibility

  • The panel is a labelled dialog; closing returns focus to the card.

Motion

  • A 460 ms transform from the card's box to the panel's and back. Reduced motion: it swaps.