# artifact.land > A publishing platform for self-contained interactive artifacts. > Upload an HTML or JSX file, get a URL. No build tools, no deployment. artifact.land hosts self-contained interactive artifacts — tools, visualizations, explanations, creative pieces, prototypes, and anything else that runs in a browser from a single file. Artifacts are created externally (in Claude, Cursor, VS Code, or by hand) and published here. --- # Overview artifact.land is a publishing platform for self-contained interactive artifacts. Makers upload an entry HTML or JSX file (plus optional images in `assets/`), and it gets a permanent URL that anyone can visit and interact with. No build tools, no deployment process, no server needed. ## What is an artifact? An artifact is a self-contained interactive thing that runs in a browser. It could be: - **A useful tool** — a color picker, regex tester, unit converter, ffmpeg command generator, mortgage calculator - **A data visualization** — an interactive chart, model explorer, financial dashboard, scenario simulator - **An interactive explanation** — a concept made tangible with sliders, animations, and explorable examples - **A creative piece** — generative art, interactive fiction, a music toy, a visual experiment - **A prototype** — a UI concept, a game mechanic, an interaction pattern - **Anything else** that's interactive and self-contained in a small bundle of files There is no prescribed style or genre. If it does something interesting when you open it in a browser, it belongs on artifact.land. ## Single file or small bundle An artifact is one entry file (`index.html` or `index.jsx`) plus any images it references, packaged together. The two shapes: - **Single file** — just an entry file, no separate assets. All content inline (base64 data URIs, embedded SVG, CDN scripts). This is what Claude artifact exports look like. - **Bundle** — an entry file at the root plus images under an `assets/` directory. Reference them with normal relative URLs (``); they're served from the same origin as the entry, so no CORS, no signed URLs in the markup. Bundles travel over the wire as a single zip file (the CLI and web upload form both build the zip for you). The server unpacks, validates, and serves each file at its bundle-relative path. See [HTML Artifacts](https://artifact.land/docs/llms/html-artifacts) for the canonical bundle structure and reference patterns. ## Two publishing paths ### JSX path (easiest for React components) Write a React component with standard imports. artifact.land transpiles JSX, resolves imports to a pre-configured runtime (React 18, Tailwind CSS, and a curated library set), and wraps everything in an HTML shell that renders your component. This is designed so that **Claude artifact exports work with zero modification** — copy the JSX, upload it, publish. **Use the JSX path when:** - You're writing a React component - The libraries you need are in the supported set (React, Recharts, D3, Three.js, Lucide, etc.) - You want the simplest possible publishing flow See [JSX Runtime](https://artifact.land/docs/llms/jsx-runtime) for the full library list and details. ### HTML path (full control) Upload a complete `.html` file. It's served exactly as-is — no compilation, no modification, no wrapping. Use any framework, any CDN libraries, any approach. **Use the HTML path when:** - You need libraries outside the JSX runtime's supported set - You're not using React (vanilla JS, Vue, Svelte, Preact, Alpine, etc.) - You want full control over the document structure - You're bundling a more complex project into a single file See [HTML Artifacts](https://artifact.land/docs/llms/html-artifacts) for details and allowed CDN domains. ## Key constraints All artifacts run in a **sandboxed iframe** on a per-artifact subdomain. Each artifact gets its own unique origin, isolated from the main app and from every other artifact. Key limits: - **No network requests** — `fetch()`, `XMLHttpRequest`, and WebSocket are all blocked - **No external images** — `img-src 'self' data: blob:` blocks remote image URLs; bundle the image instead - **No parent navigation** — cannot redirect the parent page (but `target="_blank"` links and popups open in a new tab normally) - **Bundle caps** — Free tier: 5 MB / 50 files. Pro tier: 25 MB / 200 files. - **Entry file types** — `.html` or `.jsx` - **Bundled asset types** — raster images only for v1 (`.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.avif`). Fonts, audio, and data files are inline-only for now (base64 / inline JSON still works in the entry file). Each artifact has its own subdomain origin, so `localStorage`, `sessionStorage`, `IndexedDB`, and cookies all work and are scoped to that one artifact. There's no cloud sync — storage is per-device, per-browser. See [Constraints](https://artifact.land/docs/llms/constraints) for the full list of what's blocked and what works. --- # JSX Runtime Reference When you upload a `.jsx` file to artifact.land, it's compiled into a self-contained HTML page using a pre-configured runtime. This is designed so that Claude artifact exports and similar React components work with zero modification. ## How compilation works 1. You write a `.jsx` file with standard React imports 2. artifact.land transpiles JSX to JavaScript using SWC 3. `import` statements for known libraries are replaced with CDN-loaded globals 4. Named imports (e.g., `{ useState }` from `"react"`) are destructured from the library global 5. The code is wrapped in an HTML shell with `
` 6. Your default export is auto-detected and rendered into `#root` ## Available libraries | Library | Version | Import | Global | |---------|---------|--------|--------| | react | 18.3.1 | `react` | `React` | | react-dom | 18.3.1 | `react-dom` | `ReactDOM` | | recharts | 2.12.7 | `recharts` | `Recharts` | | d3 | 7.9.0 | `d3` | `d3` | | lucide-react | | `lucide-react` | `lucideReact` | | three | r128 | `three` | `THREE` | | lodash | 4.17.21 | `lodash` | `_` | | chart.js | 4.4.1 | `chart.js` | `Chart` | | tone | 14.7.77 | `tone` | `Tone` | | papaparse | 5.4.1 | `papaparse` | `Papa` | | mathjs | 12.4.0 | `mathjs` | `math` | **Tailwind CSS** is always included via the Play CDN (`https://cdn.tailwindcss.com`). All utility classes are available. ## Component mounting Your component is automatically mounted into `
`. The runtime detects your component in this order: 1. The name of your `export default` (whatever you named it) 2. `App` 3. `Main` 4. `Component` 5. `Dashboard` ## Minimal example ```jsx import React, { useState } from "react"; export default function App() { const [count, setCount] = useState(0); return (

Count: {count}

); } ``` ## Using additional libraries Import supported libraries as you normally would: ```jsx import React from "react"; import { BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer } from "recharts"; const data = [ { name: "Jan", value: 400 }, { name: "Feb", value: 300 }, { name: "Mar", value: 600 }, { name: "Apr", value: 800 }, ]; export default function App() { return (

Monthly Data

); } ``` ## Unsupported imports If your JSX file imports a library not in the supported list, artifact.land returns an error at publish time: > Unknown import(s): some-library. artifact.land supports these libraries: [list]. For other libraries, bundle your code as a self-contained HTML file. For libraries outside the supported set, use the HTML path instead and load them from a CDN or inline the code. --- # HTML Artifacts Upload a `.html` file and it's served exactly as-is. No compilation, no modification, no wrapping. You have full control over the document. The entry file can stand alone (everything inline), or it can be paired with images in an `assets/` directory and shipped as a bundle. Either shape works for the HTML path. ## When to use HTML - You need libraries outside the JSX runtime's supported set - You're not using React (vanilla JS, Vue, Svelte, Preact, Alpine, etc.) - You want full control over the HTML structure and `` contents - You're packaging a more complex project into a single file using a build tool ## Bundle structure A bundle is one entry file at the root plus any images it references under `assets/`: ``` my-artifact/ ├── index.html ← entry file (HTML or JSX) at the root └── assets/ ├── hero.jpg ├── thumbnail.png └── icons/ └── star.webp ``` Nested subdirectories under `assets/` are fine. Anything outside this shape (a file at the root that isn't the entry, an asset above `assets/`) is rejected at upload time. Reference assets with normal relative URLs — each artifact lives on its own subdomain, so bundled files are same-origin with the entry: ```html ``` CSS `background: url(assets/...)` and `` work too — same-origin, no CORS, no signed-URL gymnastics in your markup. (CSS files themselves can't be bundled in v1; inline your `

Hello, artifact.land

A self-contained HTML artifact.

``` ## Example with a CDN library (D3) ```html
``` ## Tips - **Set the viewport meta tag** — `` ensures proper scaling on mobile - **Style the body** — set `margin: 0` and `min-height: 100vh` for full-bleed layouts - **Use `