Skip to content
AI Elements

Artifact

Server Component

A framed canvas for generated files, code, or previews.

Import

tsx
import { Artifact } from "@cronus-ui/ui";
bash
npx cronus-ui add artifact

Examples

API Reference

Generated from the component's exported types.

ArtifactProps

Extends HTMLAttributes<HTMLDivElement>

Skip ArtifactProps props table
PropTypeDefaultDescription
ref
Ref<HTMLDivElement>Ref forwarded to the underlying DOM node.

ArtifactHeaderProps

Extends HTMLAttributes<HTMLDivElement>

Skip ArtifactHeaderProps props table
PropTypeDefaultDescription
ref
Ref<HTMLDivElement>Ref forwarded to the underlying DOM node.

ArtifactCloseLabels

Skip ArtifactCloseLabels props table
PropTypeDefaultDescription
close*
string

ArtifactCloseProps

Extends ButtonHTMLAttributes<HTMLButtonElement>

Skip ArtifactCloseProps props table
PropTypeDefaultDescription
ref
Ref<HTMLButtonElement>Ref forwarded to the underlying DOM node.
labels
Partial<ArtifactCloseLabels>Override default English strings.
variant
"ghost" | "outline" | "primary" | "secondary" | "destructive" | "link""ghost"Visual variant.
size
"sm" | "md" | "lg" | "icon" | "icon-sm""icon-sm"Control size.

ArtifactTitleProps

Extends HTMLAttributes<HTMLParagraphElement>

Skip ArtifactTitleProps props table
PropTypeDefaultDescription
ref
Ref<HTMLParagraphElement>Ref forwarded to the underlying DOM node.

ArtifactDescriptionProps

Extends HTMLAttributes<HTMLParagraphElement>

Skip ArtifactDescriptionProps props table
PropTypeDefaultDescription
ref
Ref<HTMLParagraphElement>Ref forwarded to the underlying DOM node.

ArtifactActionsProps

Extends HTMLAttributes<HTMLDivElement>

Skip ArtifactActionsProps props table
PropTypeDefaultDescription
ref
Ref<HTMLDivElement>Ref forwarded to the underlying DOM node.

ArtifactActionProps

Extends ButtonHTMLAttributes<HTMLButtonElement>

Skip ArtifactActionProps props table
PropTypeDefaultDescription
ref
Ref<HTMLButtonElement>Ref forwarded to the underlying DOM node.
tooltip
string
label
string
icon
LucideIcon
variant
"ghost" | "outline" | "primary" | "secondary" | "destructive" | "link""ghost"Visual variant.
size
"sm" | "md" | "lg" | "icon" | "icon-sm""icon-sm"Control size.
children
ReactNodeContents of the component.

ArtifactContentProps

Extends HTMLAttributes<HTMLDivElement>

Skip ArtifactContentProps props table
PropTypeDefaultDescription
ref
Ref<HTMLDivElement>Ref forwarded to the underlying DOM node.