Typst Fumadocs

Block

Documentation for the `block` function.

A block-level container.

Such a container can be used to separate content, size it, and give it a background or border.

Blocks are also the primary way to control whether text becomes part of a paragraph or not. See the paragraph documentation for more details.

Examples

With a block, you can give a background to content while still allowing it to break across multiple pages.

Loading compiler...

Blocks are also useful to force elements that would otherwise be inline to become block-level, especially when writing show rules.

Loading compiler...
#block(
  width: auto | relative,
  height: auto | relative | fraction,
  breakable: bool,
  fill: none | color | gradient | tiling,
  stroke: none | length | color | gradient | stroke | tiling | dictionary,
  radius: relative | dictionary,
  inset: relative | dictionary,
  outset: relative | dictionary,
  spacing: relative | fraction,
  above: auto | relative | fraction,
  below: auto | relative | fraction,
  clip: bool,
  sticky: bool,
  body
) -> content

Parameters

Prop

Type

On this page