This document shows how to make callouts collapsible by default using a Lua filters since 1.3 has introduced new Custom AST nodes.

function Callout(el)
  if quarto.doc.isFormat("html") then
    -- Set default collapse to true if unset
    if not el.collapse then
      el.collapse = true
    end
    return el
  end
end

Callout Blocks

Note that there are five types of callouts, including: note, warning, important, tip, and caution.

This is an example of a callout with a caption.

This is an example of a ‘folded’ caution callout that can be expanded by the user. You can use collapse="true" to collapse it by default or collapse="false" to make a collapsible callout that is expanded by default.

This is important

WATCH OUT !!

This one is not collapsed by default because collapse='false' as been seen on

:::{.callout-warning icon='false' collapse='false'}