Code
A pure vanilla JS implementation of Prism JS
Anatomy
The Code component can be configured as a code block or a inline code.
import "@netoum/corex";
import "@netoum/corex";
npm install @netoum/corex
npm install @netoum/corex
Data attributes
Each code can be set with different settings with the following data-attribute.
npm install @netoum/corex
import "@netoum/corex";
import "@netoum/corex";
@import "@netoum/corex-css";
<button class="button">Text</button>
Custom Languages
By default the following languages are available
html
js
ts
css
markup
bash
shell-session
To add more languages you will need to install and import to required languages
npm install prismjs @types/prismjs
import "prismjs/components/prism-go";
import "prismjs/components/prism-halm";
Templates
Code components is available in the followng templates
-
Corex template
Default corex templates. It provides the global, semantic and components tokens
-
Modex template
Based on Corex default template, it adds dark and light mode option to the tokens
-
Themex template
Based on the Corex default template, it adds theming capabilities as well as light and dark mode options to the tokens.