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.

552 B
Raw Blame
/* Copyright 2026 Marimo. All rights reserved. */
import React, { type PropsWithChildren } from "react";

const style = {
  display: "contents",
};

/**
 * Adds the 'marimo' className which serves as a namespace to its children,
 * so that the styles are scoped to the DOM subtree.
 */
export const StyleNamespace = React.forwardRef<
  HTMLDivElement,
  PropsWithChildren<{}>
>(({ children }, ref) => {
  return (
    <div ref={ref} className="marimo" style={style}>
      {children}
    </div>
  );
});

StyleNamespace.displayName = "StyleNamespace";