Skip to content

Slideshow

Creates image slideshows with left/right navigation arrows and scroll-snap behavior.

Usage

import markdown

md = markdown.Markdown(extensions=["markwright.slideshow"])
html = md.convert("[slideshow https://example.com/a.jpg https://example.com/b.jpg]")

See Using with MkDocs to load it in a MkDocs site.

Syntax

[slideshow URL1 URL2 ...URLs HEIGHT WIDTH]
Parameter Default Description
URLs required (1+) Image URLs (one or more)
HEIGHT 270 Slideshow height in pixels
WIDTH 480 Slideshow width in pixels

Height and width are optional trailing integers. They are distinguished from URLs by being purely numeric.

Examples

Basic Slideshow

[slideshow https://picsum.photos/id/10/480/270 https://picsum.photos/id/20/480/270 https://picsum.photos/id/30/480/270]
‹
›
Slide #1 Slide #2 Slide #3

Custom Dimensions

[slideshow https://picsum.photos/id/10/600/400 https://picsum.photos/id/20/600/400 400 600]
‹
›
Slide #1 Slide #2

Notes

  • The embed must be on its own line
  • At least one image URL is required (a single-image slideshow is valid, matching upstream do-markdownit)
  • Navigation arrows appear on left and right sides
  • Uses CSS scroll-snap for smooth slide transitions
  • No script injection required