This widget allows you to render code with correct syntactical representation.
Property | type | Description | Default |
---|---|---|---|
code | string | The code to be formatted or displayed | - |
language | string | The language in which the code is written. Supported values => 'bash', 'c', 'clojure', 'cpp', 'csharp', 'dart', 'elixir', 'elm', 'erlang', 'fsharp', 'graphql', 'go', 'groovy', 'haskell', 'html', 'java', 'javascript', 'jsx', 'julia', 'kotlin', 'lisp', 'makefile', 'matlab', 'objectivec', 'ocaml', 'php', 'python', 'r', 'ruby', 'rust', 'scala', 'sql', 'swift', 'tsx', 'typescript', 'javascript' | text |
showLineNumbers | boolean | Indicates whether to show line numbers | true |
wrapLines | boolean | If true, wrap long lines | true |
theme | string | To style you code block. Supported values => dracula, github, nord, rainbow | dracula |