Skip to main content
Version: Next

Code Block

The Code Block component provides a lightweight and semantic way to display formatted code using native HTML pre and code elements.

Ignix Lite code blocks support multiple languages and horizontal scrolling for long code snippets.


Languages

function greet() {
console.log("Hello world")
}

Usage

pnpm add @mindfiredigital/ignix-lite

Attributes

AttributeTypeDescription
data-langstringIndicates the programming language
preelementWrapper for formatted code
codeelementDisplays inline or block code