PHPackages                             mrshanebarron/code-block - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. mrshanebarron/code-block

ActiveLibrary[Templating &amp; Views](/categories/templating)

mrshanebarron/code-block
========================

Syntax highlighted code block component for Laravel - supports Livewire and Vue

v1.0.3(5mo ago)09MITBladePHP ^8.1

Since Dec 14Pushed 4mo agoCompare

[ Source](https://github.com/mrshanebarron/code-block)[ Packagist](https://packagist.org/packages/mrshanebarron/code-block)[ RSS](/packages/mrshanebarron-code-block/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Code Block
==========

[](#code-block)

A syntax-highlighted code block component for Laravel applications. Displays code with optional line numbers and copy functionality. Works with Livewire and Vue 3.

Installation
------------

[](#installation)

```
composer require mrshanebarron/code-block
```

Livewire Usage
--------------

[](#livewire-usage)

### Basic Usage

[](#basic-usage)

```

    const greeting = "Hello, World!";
    console.log(greeting);

```

### With Line Numbers

[](#with-line-numbers)

```
