<code-block>

A lightweight Web Component for displaying code with syntax highlighting, copy functionality, line numbers, and theme support.

function greet(name) { return `Hello, ${name}!`; }

Features

Quick Start

Installation

Install via npm:

npm install @profpowell/code-block

Or include via CDN:

<script type="module" src="https://unpkg.com/@profpowell/code-block"></script>

Basic Usage

<code-block language="javascript"> const greeting = "Hello, World!"; console.log(greeting); </code-block>