Code snippets

Brienne Wong
Brienne Wong
  • Updated

Code snippets are useful if you only need to showcase a piece of code, but don't need to render it or show a preview. For example, if developers want to include instructions on how to fetch the code for design system components, they can do it using a code snippet:

Code block

code snippet example

Code snippets support syntax highlighting in many different types of programming languages (see below for the full list of supported syntax/programming languages):

Dropdown menu with programming language options for code snippets

Supported syntax / programming languages

  1. C
  2. C++
  3. C#
  4. CoffeeScript
  5. CSS
  6. Dockerfile
  7. diff
  8. Dart
  9. Go
  10. Groovy
  11. HAML
  12. Handlebars             
  13. HTML
  14. HTTP
  15. Java
  16. JavaScript
  17. Typescript
  18. TSX
  19. JSX
  20. Kotlin
  21. LESS
  22. Objective
  23. Perl
  24. PHP
  25. Pug
  26. Puppet
  27. Python
  28. Ruby
  29. Rust
  30. Sass
  31. Scala
  32. SCSS
  33. Shell
  34. SQL
  35. Swift
  36. Vue
  37. XML
  38. YAML

👉 Note: If you'd like to request support for a language that isn't listed above, please let us know at support@zeroheight.com, as we can easily add it.

Was this article helpful?