Skip to content

ArdoCodeBlock

ArdoCodeBlock component

ArdoCodeBlock

Usage

<ArdoCodeBlock
  code?={string}
  language?={string}
  title?={string}
  lineNumbers?={boolean}
  highlightLines?={number[]}
  __html?={string}
>
  {children}
</ArdoCodeBlock>

Props

PropTypeRequiredDescription
codestringNoThe code to display (as prop or as children string)
languagestringNoProgramming language for syntax highlighting
titlestringNoOptional title shown above the code
lineNumbersbooleanNoShow line numbers
highlightLinesnumber[]NoLine numbers to highlight
childrenReactNodeNoCode as children — supports template literals with auto-outdent
__htmlstringNoPre-rendered Shiki HTML (injected by ardo:codeblock-highlight plugin)

Source


ArdoCodeGroup →