Astromotion

An example deck

who’s responsible for this?

who should I yell at?

Ben Swift

What is astromotion?

  • Astro + Reveal.js directly
  • Marp-inspired markdown syntax
  • slides separated by --- thematic breaks
  • brand-matched deck theme out of the box

Slide classes

Use a JSX comment to set a class on any slide:

{/* _class: impact */}

Available classes: impact, hero, quote, centered

big ideas deserve big slides

Background images

Full-bleed, split, and filtered backgrounds. Co-locate the image under src/decks/assets/ and reference it with a relative path:

![bg](./assets/photo.avif)

![bg right:40%](./assets/side.avif)

![bg brightness:0.5 blur:2px](./assets/dark.avif)

Full-bleed background

This slide uses ![bg brightness:0.6] with a photo from the hero collection.

Split layout

This slide uses ![bg right:40%] to put the image on the right.

The content sits in the remaining 60% on the left.

Filtered background

This slide combines blur:3px and brightness:0.2 to keep text readable over a busy image.

Hero slides

The best way to predict the future is to invent it.

Centred content

This slide uses {/* _class: centered */} to vertically centre everything.

Code blocks

Fenced code blocks get syntax highlighting automatically:

```javascript
const greeting = "hello world";
```

Code blocks in action

import { astromotion } from "astromotion";

export default defineConfig({
  integrations: [astromotion({ theme: "./src/decks/theme.css" })],
});

Speaker notes

Add notes that appear in the Reveal.js speaker view, written as markdown:

```notes
Remember to explain this part **slowly**.
```

Press S right now to see the speaker note on this slide.

QR codes

Link to any URL with an animated QR code:

![qr](https://example.com)

QR code in action

Reusable partials

Compose decks from shared fragments with @include — deck-only partials live under src/decks/partials/ and are included by relative path:

{/* @include ./partials/closing.mdx */}

go make some slides