This guide explains how to render icons with the inline-svg partial. For all available arguments, see the partial reference page.

Examples

Required arguments only

{{- partial "inline-svg" (dict "page" . "src" "check") }}

All arguments

{{- $opts := dict
  "page" .
  "src" "svgs/tabler-icons/check.svg"
  "id" "svg-check"
  "class" "check-icon"
  "role" "img"
  "title" "Success"
  "desc" "Operation completed successfully"
  "ariaLabelledby" "logo-title"
  "ariaDescribedby" "logo-desc"
  "width" "32"
  "height" "32"
  "stroke-width" "1.5"
}}
{{- partial "inline-svg.html" $opts }}