Artifact expand (Pro)
ProIncluded in $99An artifact that opens out of its message: the inline card grows into the side panel.
On this page
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
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
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
| Prop | Type | Notes |
|---|---|---|
title / kind | string | |
open / onOpenChange | boolean | |
preview | ReactNode | Inside the inline card |
children | ReactNode | The artifact, in the panel |
Keyboard
| Key | Action |
|---|---|
Escape | Close 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.