Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Available options for `marimo-embed`:

- `height`: Named sizes (`small`, `medium`, `large`, `xlarge`, `xxlarge`) or custom pixel values (e.g. `500px`) (default: medium)
- `mode`: read, edit (default: read)
- `app_width`: wide, full, compact (default: wide)
- `app_width`: medium, full, compact (default: medium)

You can also embed marimo files directly:

Expand Down
12 changes: 6 additions & 6 deletions docs/getting-started/blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Here's a simple example of embedding a marimo notebook using blocks:
/// marimo-embed
height: 400px
mode: read
app_width: wide
app_width: medium

```python
@app.cell
Expand All @@ -49,7 +49,7 @@ def __():
/// marimo-embed
height: 400px
mode: read
app_width: wide
app_width: medium

```python
@app.cell
Expand All @@ -76,7 +76,7 @@ Here's an example with an interactive plot:
/// marimo-embed
height: 800px
mode: read
app_width: wide
app_width: medium

```python
@app.cell
Expand Down Expand Up @@ -114,7 +114,7 @@ def __():
/// marimo-embed
height: 800px
mode: read
app_width: wide
app_width: medium

```python
@app.cell
Expand Down Expand Up @@ -155,7 +155,7 @@ Here's an example that hides the code:
/// marimo-embed
height: 400px
mode: read
app_width: wide
app_width: medium
include_code: false

```python
Expand Down Expand Up @@ -183,7 +183,7 @@ def __():
| --- | --- | --- |
| `height` | Controls the height of the embed | - Named sizes: `small` (300px), `medium` (400px), `large` (600px),<br> `xlarge` (800px), `xxlarge` (1000px)<br>- Custom size: Any pixel value (e.g. `500px`) |
| `mode` | Controls the interaction mode | - `read`: Read-only view (default)<br>- `edit`: Allows editing the code |
| `app_width` | Controls the width of the marimo app | - `wide`: Standard width (default)<br>- `full`: Full width<br>- `compact`: Narrow width |
| `app_width` | Controls the width of the marimo app | - `medium`: Standard width (default)<br>- `full`: Full width<br>- `compact`: Narrow width |
| `include_code` | Controls whether code is included in the embed | - `true`: Show code (default)<br>- `false`: Hide code |

### marimo-embed-file
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pip install pymdown-extensions
/// marimo-embed
height: 400px
mode: read
app_width: wide
app_width: medium

```python
@app.cell
Expand Down
4 changes: 2 additions & 2 deletions mkdocs_marimo/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class MarimoEmbedBlock(BaseMarimoBlock):
NAME: str = "marimo-embed"
OPTIONS: Dict[str, List[Union[str, Any]]] = {
**BaseMarimoBlock.OPTIONS,
"app_width": ["wide", type_string_in(["wide", "full", "compact"])],
"app_width": ["medium", type_string_in(["medium", "full", "compact"])],
}

def on_end(self, block: etree.Element) -> None:
Expand Down Expand Up @@ -143,7 +143,7 @@ def uri_encode_component(code: str) -> str:
def create_marimo_app_code(
*,
code: str,
app_width: str = "wide",
app_width: str = "medium",
) -> str:
header = "\n".join(
[
Expand Down
Loading