Skip to main content Notion blocksĀ  for Svelte
Beat Technology AS


This page is generated from a page in Notion database, and is intended to demonstrate the capability of the Code block.

You can view this page in Notion to see that it corresponds well to what is displayed.

You can pick a stylesheet below to change how it renders.


Code blocks are interesting. They often come with a language, that you can use to do syntax highlighting. This library does not come with a syntax highlighter, though, but we do tag the resulting HTML tags with enough information to add it later.

Code blocks also support captions.


Some examples (these will render the same without a syntax highlighter):

FROM customers
WHERE first_name = 'Robert';
SQL code.
interface User {
  name: string;
  id: number;
This is TypeScript


Code blocks should be styled by selecting .code.

Additionally, a lang-{language} class will be applied to identify the language inside it.