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.

docs: add diagrams section (#568)

Akshay Agrawal04d8e0c00ab7
diff --git a/docs/api/diagrams.md b/docs/api/diagrams.md
new file mode 100644
index 0000000000..03d292ef78
--- /dev/null
+++ b/docs/api/diagrams.md
@@ -0,0 +1,18 @@
+# Diagrams
+
+<!-- <iframe class="demo large" src="https://components.marimo.io/?component=mermaid" frameborder="no"></iframe> -->
+
+## Mermaid diagrams
+
+```{eval-rst}
+.. autofunction:: marimo.mermaid
+```
+
+
+## Statistic cards
+
+<iframe class="demo medium" src="https://components.marimo.io/?component=stat" frameborder="no"></iframe>
+
+```{eval-rst}
+.. autofunction:: marimo.stat
+```
diff --git a/docs/api/index.md b/docs/api/index.md
index 3e5f308ddb..d7f31e7110 100644
--- a/docs/api/index.md
+++ b/docs/api/index.md
@@ -10,6 +10,7 @@
layouts/index
plotting
media/index
+ diagrams
status
outputs
control_flow
@@ -33,6 +34,7 @@ Use the marimo library in marimo notebooks (`import marimo as mo`) to
| {doc}`layouts/index` | Customize outputs with accordions, tabs, stacks, and more |
| {doc}`plotting` | Output interactive plots |
| {doc}`media/index` | Output media like images, audio, PDFs, and plain text |
+| {doc}`diagrams` | Flow charts, graphs, statistic cards, and more |
| {doc}`status` | Display progress indicators |
| {doc}`outputs` | Modify cell outputs, redirect console output |
| {doc}`control_flow` | Control how cells execute |
diff --git a/docs/api/layouts/index.md b/docs/api/layouts/index.md
index a0c8a4d092..f3fcaa12d1 100644
--- a/docs/api/layouts/index.md
+++ b/docs/api/layouts/index.md
@@ -9,9 +9,7 @@
callout
image
justify
- mermaid
stacks
- stat
tabs
tree
```
@@ -29,9 +27,7 @@ certain way.
marimo.center
marimo.hstack
marimo.left
- marimo.mermaid
marimo.right
- marimo.stat
marimo.tabs
marimo.tree
marimo.vstack
diff --git a/docs/api/layouts/mermaid.md b/docs/api/layouts/mermaid.md
deleted file mode 100644
index 03867d07ce..0000000000
--- a/docs/api/layouts/mermaid.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Mermaid Diagrams
-
-<!-- <iframe class="demo large" src="https://components.marimo.io/?component=mermaid" frameborder="no"></iframe> -->
-
-```{eval-rst}
-.. autofunction:: marimo.mermaid
-```
diff --git a/docs/api/layouts/stat.md b/docs/api/layouts/stat.md
deleted file mode 100644
index 5e6b4cf6df..0000000000
--- a/docs/api/layouts/stat.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Stat
-
-<iframe class="demo medium" src="https://components.marimo.io/?component=stat" frameborder="no"></iframe>
-
-```{eval-rst}
-.. autofunction:: marimo.stat
-```