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.

Add slides documentation and video (#9464)

Shahmir Varqhace2bcd500e64
diff --git a/docs/_static/docs-slides-view.mp4 b/docs/_static/docs-slides-view.mp4
new file mode 100644
index 0000000000..2242f25670
Binary files /dev/null and b/docs/_static/docs-slides-view.mp4 differ
diff --git a/docs/guides/apps.md b/docs/guides/apps.md
index cdf1f5d06e..14551a44ed 100644
--- a/docs/guides/apps.md
+++ b/docs/guides/apps.md
@@ -80,11 +80,19 @@ Enable the grid editor in the app preview, via a dropdown:
If you prefer a slideshow-like experience, you can use the slides layout. Enable the slides layout in the app preview, via the same dropdown as above.
-Unlike the grid layout, the slides are much less customizable:
+<video muted controls loop playsinline width="100%" src="/_static/docs-slides-view.mp4" aria-label="Video showing the slides layout editor">
+</video>
+
+#### Features
+
+- A slide minimap on the left where you can drag and drop slides to rearrange them.
+- A config sidebar on the right where you can configure the type of each slide.
+- Edit code and run cells by clicking the Code toggle or using the keyboard shortcut `C`.
+- Powered by [reveal.js](https://revealjs.com/), so you can use most of its features like keyboard shortcuts, navigation, etc.
+
+#### Notes
- The order of the slides is determined by the order of the cells in the notebook.
-- The slides do not support drag-and-drop rearrangement or resizing.
-- All outputs are shown and all code is hidden.
- For PDF export, use `marimo export pdf notebook.py --as=slides --raster-server=live` for slide-style output with better capture compatibility.
If you need more control over the layout, please file an issue on [GitHub](https://github.com/marimo-team/marimo/issues),
diff --git a/docs/guides/lint_rules/index.md b/docs/guides/lint_rules/index.md
index 5523db2411..a914611a81 100644
--- a/docs/guides/lint_rules/index.md
+++ b/docs/guides/lint_rules/index.md
@@ -1,6 +1,6 @@
# Lint Rules
-<!-- Autogenerated! Please edit scripts/generate_lint_docs.py instead --!>
+<!-- Autogenerated! Please edit scripts/generate_lint_docs.py instead -->
marimo includes a linter that helps you write better notebooks. The linter checks for various issues that could prevent your notebook from running correctly or cause confusion.
diff --git a/frontend/src/components/slides/slide-form.tsx b/frontend/src/components/slides/slide-form.tsx
index 90028dab36..44fac7f178 100644
--- a/frontend/src/components/slides/slide-form.tsx
+++ b/frontend/src/components/slides/slide-form.tsx
@@ -8,6 +8,7 @@ import {
CookieIcon,
PanelRightCloseIcon,
PanelRightOpenIcon,
+ KeyboardIcon,
} from "lucide-react";
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
import {
@@ -28,6 +29,7 @@ import type {
import { useState } from "react";
import { Tooltip } from "../ui/tooltip";
import { Button } from "../ui/button";
+import { Kbd } from "../ui/kbd";
import type { RuntimeCell } from "@/core/cells/types";
export const DEFAULT_SLIDE_TYPE: SlideType = "slide";
@@ -132,10 +134,51 @@ const SlidesForm = ({
<TabsContent value="deck" className="mt-0 flex-1">
<DeckConfigForm layout={layout} setLayout={setLayout} />
</TabsContent>
+ <hr />
+ <KeyboardTips />
</Tabs>
);
};
+const KEYBOARD_TIPS: { keys: string[]; description: string }[] = [
+ { keys: ["F"], description: "Enter fullscreen" },
+ { keys: ["C"], description: "Toggle code editor" },
+];
+
+const KEYBOARD_SHORTCUTS_URL =
+ "https://vlaaad.github.io/reveal/keyboard-shortcuts";
+
+const KeyboardTips = () => {
+ return (
+ <div className="flex flex-col gap-2 text-xs text-muted-foreground">
+ <div className="flex items-center gap-1.5 font-medium text-foreground/80">
+ <KeyboardIcon className="h-3.5 w-3.5" />
+ <span>Shortcuts</span>
+ </div>
+ <ul className="flex flex-col gap-1.5">
+ {KEYBOARD_TIPS.map(({ keys, description }) => (
+ <li key={description} className="flex items-center justify-between">
+ <span>{description}</span>
+ <span className="flex gap-1">
+ {keys.map((key) => (
+ <Kbd key={key}>{key}</Kbd>
+ ))}
+ </span>
+ </li>
+ ))}
+ </ul>
+ <a
+ href={KEYBOARD_SHORTCUTS_URL}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="text-link hover:underline"
+ >
+ See all shortcuts
+ </a>
+ </div>
+ );
+};
+
const SlideConfigForm = ({
layout,
setLayout,
diff --git a/scripts/generate_lint_docs.py b/scripts/generate_lint_docs.py
index ade09dba4d..2614d4eaec 100755
--- a/scripts/generate_lint_docs.py
+++ b/scripts/generate_lint_docs.py
@@ -274,7 +274,7 @@ def generate_main_index_page(rules_by_severity: dict[Severity, list[dict[str, An
"""Generate the main lint rules index page."""
content = """# Lint Rules
-<!-- Autogenerated! Please edit scripts/generate_lint_docs.py instead --!>
+<!-- Autogenerated! Please edit scripts/generate_lint_docs.py instead -->
marimo includes a linter that helps you write better notebooks. The linter checks for various issues that could prevent your notebook from running correctly or cause confusion.