Kinetic UI
Back to Introduction
AI & Generative

AI Artifact Sandbox

Split-view dynamic preview box that renders generated UI, code, or markdown with live sandbox toggles.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add ai-artifact-sandbox
AI Artifact Sandbox
Artifact Viewer
⚡ AI Component Artifact

Installation

npx kinetic-ui-cli@latest add

Props

Accepts initial view state and custom artifact payload contents.

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

import { AiArtifactSandbox } from "@/components/creative/ai-artifact-sandbox";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { AiArtifactSandbox } from "@/components/creative/ai-artifact-sandbox";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <AiArtifactSandbox
        initialMode{/* value */}
      />
    </div>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.