PHPackages                             prismjs/prism - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. prismjs/prism

ActiveComponent[Utility &amp; Helpers](/categories/utility)

prismjs/prism
=============

Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.

v1.30.0(1y ago)12.9k65.9k↓19.7%1.4k[386 issues](https://github.com/PrismJS/prism/issues)[91 PRs](https://github.com/PrismJS/prism/pulls)4MITJavaScriptCI failing

Since Sep 9Pushed 1mo ago118 watchersCompare

[ Source](https://github.com/PrismJS/prism)[ Packagist](https://packagist.org/packages/prismjs/prism)[ RSS](/packages/prismjs-prism/feed)WikiDiscussions v2 Synced 1mo ago

READMEChangelog (10)DependenciesVersions (45)Used By (4)

[Prism](https://prismjs.com/)
=============================

[](#prism)

[![Build Status](https://github.com/PrismJS/prism/workflows/CI/badge.svg)](https://github.com/PrismJS/prism/actions)[![npm](https://camo.githubusercontent.com/d6feeb5eebb79b70a683c0f5fe6c7d54e0f7f30a7b5f17c70a6c04772895530e/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f64772f707269736d6a732e737667)](https://www.npmjs.com/package/prismjs)

Prism is a lightweight, robust, and elegant syntax highlighting library. It's a spin-off project from [Dabblet](https://dabblet.com/).

You can learn more on [prismjs.com](https://prismjs.com/).

[Why another syntax highlighter?](https://lea.verou.me/2012/07/introducing-prism-an-awesome-new-syntax-highlighter/#more-1841)

[More themes for Prism!](https://github.com/PrismJS/prism-themes)

Contribute to Prism!
--------------------

[](#contribute-to-prism)

### **Important Notice**

[](#important-notice)

We are currently working on [Prism v2](https://github.com/PrismJS/prism/discussions/3531) and will only accept security-relevant PRs for the time being.

Once work on Prism v2 is sufficiently advanced, we will accept PRs again. This will be announced on our [Discussion](https://github.com/PrismJS/prism/discussions) page and mentioned in the [roadmap discussion](https://github.com/PrismJS/prism/discussions/3531).

Prism v1 contributing notesPrism depends on community contributions to expand and cover a wider array of use cases. If you like it, consider giving back by sending a pull request. Here are a few tips:

- Read the [documentation](https://prismjs.com/extending.html). Prism was designed to be extensible.
- Do not edit `prism.js`, it’s just the version of Prism used by the Prism website and is built automatically. Limit your changes to the unminified files in the `components/` folder. `prism.js` and all minified files are generated by our build system (see below).
- Use `npm ci` to install Prism's dependencies. Do not use `npm install` because it will cause non-deterministic builds.
- The build system uses [gulp](https://github.com/gulpjs/gulp) to minify the files and build `prism.js`. With all of Prism's dependencies installed, you just need to run the command `npm run build`.
- Please follow the code conventions used in the files already. For example, I use [tabs for indentation and spaces for alignment](http://lea.verou.me/2012/01/why-tabs-are-clearly-superior/). Opening braces are on the same line, closing braces on their own line regardless of construct. There is a space before the opening brace. etc etc.
- Please try to err towards more smaller PRs rather than a few huge PRs. If a PR includes changes that I want to merge and also changes that I don't, handling it becomes difficult.
- My time is very limited these days, so it might take a long time to review bigger PRs (small ones are usually merged very quickly), especially those modifying the Prism Core. This doesn't mean your PR is rejected.
- If you contribute a new language definition, you will be responsible for handling bug reports about that language definition.
- If you [add a new language definition](https://prismjs.com/extending.html#creating-a-new-language-definition) or plugin, you need to add it to `components.json` as well and rebuild Prism by running `npm run build`, so that it becomes available to the download build page. For new languages, please also add a few [tests](https://prismjs.com/test-suite.html) and an example in the `examples/` folder.
- Go to [prism-themes](https://github.com/PrismJS/prism-themes) if you want to add a new theme.

Thank you so much for contributing!!

### Software requirements

[](#software-requirements)

Prism will run on [almost any browser](https://prismjs.com/#features-full) and Node.js version but you need the following software to contribute:

- Node.js &gt;= 10.x
- npm &gt;= 6.x

Translations
------------

[](#translations)

- [简体中文](https://www.awesomes.cn/repo/PrismJS/prism) (if unavailable, see [here](https://deepmind.t-salon.cc/article/113))

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance69

Regular maintenance activity

Popularity65

Solid adoption and visibility

Community45

Growing community involvement

Maturity76

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~97 days

Recently: every ~371 days

Total

33

Last Release

66d ago

Major Versions

v1.30.0 → v2.x-dev2026-03-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/843060e17dd1d74064b894e0fc858dfa106921c07a0266c1100eb2d478175093?d=identicon)[thejoshsmith](/maintainers/thejoshsmith)

---

Top Contributors

[![Golmote](https://avatars.githubusercontent.com/u/565460?v=4)](https://github.com/Golmote "Golmote (1207 commits)")[![RunDevelopment](https://avatars.githubusercontent.com/u/20878432?v=4)](https://github.com/RunDevelopment "RunDevelopment (1086 commits)")[![LeaVerou](https://avatars.githubusercontent.com/u/175836?v=4)](https://github.com/LeaVerou "LeaVerou (404 commits)")[![zeitgeist87](https://avatars.githubusercontent.com/u/1210795?v=4)](https://github.com/zeitgeist87 "zeitgeist87 (128 commits)")[![mAAdhaTTah](https://avatars.githubusercontent.com/u/4371429?v=4)](https://github.com/mAAdhaTTah "mAAdhaTTah (49 commits)")[![DmitrySharabin](https://avatars.githubusercontent.com/u/9166277?v=4)](https://github.com/DmitrySharabin "DmitrySharabin (45 commits)")[![milesj](https://avatars.githubusercontent.com/u/143744?v=4)](https://github.com/milesj "milesj (42 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (27 commits)")[![nauzilus](https://avatars.githubusercontent.com/u/5241145?v=4)](https://github.com/nauzilus "nauzilus (27 commits)")[![idleberg](https://avatars.githubusercontent.com/u/1504938?v=4)](https://github.com/idleberg "idleberg (26 commits)")[![hoonweiting](https://avatars.githubusercontent.com/u/59229084?v=4)](https://github.com/hoonweiting "hoonweiting (23 commits)")[![vkbansal](https://avatars.githubusercontent.com/u/5930351?v=4)](https://github.com/vkbansal "vkbansal (22 commits)")[![aviaryan](https://avatars.githubusercontent.com/u/4047597?v=4)](https://github.com/aviaryan "aviaryan (21 commits)")[![CupOfTea696](https://avatars.githubusercontent.com/u/7327050?v=4)](https://github.com/CupOfTea696 "CupOfTea696 (18 commits)")[![valtlai](https://avatars.githubusercontent.com/u/5496284?v=4)](https://github.com/valtlai "valtlai (16 commits)")[![apfelbox](https://avatars.githubusercontent.com/u/1032411?v=4)](https://github.com/apfelbox "apfelbox (15 commits)")[![tshedor](https://avatars.githubusercontent.com/u/865897?v=4)](https://github.com/tshedor "tshedor (14 commits)")[![westonganger](https://avatars.githubusercontent.com/u/3414795?v=4)](https://github.com/westonganger "westonganger (12 commits)")[![ravinggenius](https://avatars.githubusercontent.com/u/21517?v=4)](https://github.com/ravinggenius "ravinggenius (11 commits)")[![edukisto](https://avatars.githubusercontent.com/u/52005215?v=4)](https://github.com/edukisto "edukisto (10 commits)")

### Embed Badge

![Health badge](/badges/prismjs-prism/health.svg)

```
[![Health](https://phpackages.com/badges/prismjs-prism/health.svg)](https://phpackages.com/packages/prismjs-prism)
```

###  Alternatives

[ishanvyas22/asset-mix

Asset Mix plugin for CakePHP

3375.4k2](/packages/ishanvyas22-asset-mix)[prgayman/laravel-zatca

Laravel package a helper to Generate the QR code and signed it for ZATCA E-invoicing

2926.9k1](/packages/prgayman-laravel-zatca)[ducks-project/spl-types

Polyfill Module for SplType PHP extension. This extension aims at helping people making PHP a stronger typed language and can be a good alternative to scalar type hinting. It provides different typehandling classes as such as integer, float, bool, enum and string

1032.4k](/packages/ducks-project-spl-types)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
