Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

706 B
Raw Blame
/* Copyright 2026 Marimo. All rights reserved. */
import "../vega/vega.css";

import React from "react";
import { z } from "zod";
import { createPlugin } from "@/plugins/core/builder";
import type { DataExplorerState } from "./ConnectedDataExplorerComponent";

const LazyDataExplorerComponent = React.lazy(
  () => import("./ConnectedDataExplorerComponent"),
);

export const DataExplorerPlugin = createPlugin<DataExplorerState>(
  "marimo-data-explorer",
)
  .withData(
    z.object({
      label: z.string().nullish(),
      data: z.string(),
    }),
  )
  .renderer((props) => (
    <LazyDataExplorerComponent
      {...props.data}
      value={props.value}
      setValue={props.setValue}
    />
  ));