Background

Cells occupy the main slide body. The background plane sits behind them, covering the slide without changing the grid. Put recurring background content in m.setup(background:), and set it for one slide with the same argument on m.slide. A plane is not a cell, so it never appears in cells:. Use background: none on a slide to hide inherited content. The Foreground page covers the plane above the body.

Placed content

Native place positions images, shapes, and other Typst content independently of the grid.

#import "@preview/mosaic:0.0.1" as m

#show: m.setup
#set text(size: 22pt)

#m.slide(
  "content",
  variant: "body",
  background: [
    #place(center)[
      #circle(width: 410pt, fill: blue.lighten(88%), stroke: none)
    ]
  ],
)[
  == Full-slide backgrounds

  The circle is behind the grid.
]
Placed background content, first frame of 1 Open slideshow · 1 frame
Placed background content

Loading slideshow…

Page 1 of 1
Open PDF

Photographic backgrounds

Pass a slide-sized image through the reserved background entry. The optional scrim of m.components.image() paints a translucent layer over the photograph so the text in front stays readable. The Scrims section covers the flat, gradient, and light options.

#import "@preview/mosaic:0.0.1" as m

#show: m.setup
#set page(fill: rgb("#f4f1ea"))
#set text(size: 22pt, fill: rgb("#172033"))

// Anchor the body content to the right, past the image, through its label.
#show label("mosaic-cell-body"): set align(right + horizon)

#m.slide(
  "content",
  variant: "body",
  background: m.components.image(
  path("/docs-src/assets/images/bonsai.webp"),
  scrim: white.transparentize(65%),
  alt: "A pine bonsai",
),
)[
  #block(width: 38%)[
    == A background image

    Pass `m.components.image()` content through the `background` entry.
  ]
]
Full-slide background image, first frame of 1 Open slideshow · 1 frame
Full-slide background image

Loading slideshow…

Page 1 of 1
Open PDF