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 snippets support syntax highlighting in many different types of programming languages (see below for the full list of supported syntax/programming languages):
Supported syntax / programming languages
- C
- C++
- C#
- CoffeeScript
- CSS
- Dockerfile
- diff
- Dart
- Go
- Groovy
- HAML
- Handlebars
- HTML
- HTTP
- Java
- JavaScript
- Typescript
- TSX
- JSX
- Kotlin
- LESS
- Objective
- Perl
- PHP
- Pug
- Puppet
- Python
- Ruby
- Rust
- Sass
- Scala
- SCSS
- Shell
- SQL
- Swift
- Vue
- XML
- 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.