Skip to content

heading block

  • shadcn (base)
  • signature (override)
  • text — Text; type: text; default: "New Heading"
  • level — Level; type: select; default: "h2"; options: [{"label": "Heading 1", "value": "h1"}, {"label": "Heading 2", "value": "h2"}, {"label": "Heading 3", "value": "h3"}, {"label": "Heading 4", "value": "h4"}, {"label": "Heading 5", "value": "h5"}, {"label": "Heading 6", "value": "h6"}]
  • None
  • Field: display.show_when
  • Default: show
  • Truthiness: empty string, null, undefined, false, 0 and the exact strings “false” and “0” are falsy; everything else is truthy
  • (unset) — show (default)
  • authenticated — show only when the viewer is authenticated
  • unauthenticated — show only when the viewer is not authenticated
  • expr:<path> — show when the dotted context path is truthy
  • expr:!<path> — show when the dotted context path is falsy
  • expr:<path> == <path> — show when the two operands are equal; primitive values are compared as strings, an absent or null operand only equals another absent or null operand, and objects compare by identity; either operand may be a whole {{time.}} token
  • expr:<path> != <path> — show when the two operands are not equal under the == comparison
  • expr:<path> == <literal> — quoted strings, numbers, true, false and null are literal operands; bare words remain context paths
  • expr:<operand> < <operand> — ordering also supports <=, > and >=; numeric values and numeric strings compare numerically, other strings lexically; absent values do not order
  • expr:count(<path>) — the length of an array, or zero for absent or non-array values; count is the only supported function
  • expr:(<term>) — parentheses group expressions and may override boolean precedence
  • expr:<term> && <term> — show when both terms hold; each term is one of the expr: forms above
  • expr:<term> || <term> — show when either term holds; && binds tighter than ||, so a || b && c means a || (b && c)
  • <unknown keyword> — show (backwards-compatible fallback)