New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@astrojs/prism

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astrojs/prism

Add Prism syntax highlighting support to your Astro site

latest
Source
npmnpm
Version
4.0.1
Version published
Weekly downloads
1.5M
-17.25%
Maintainers
2
Weekly downloads
 
Created
Source

@astrojs/prism

Supports Prism highlighting in Astro projects

Component

This package exports a component to support highlighting inside an Astro file. Example:

---
import { Prism } from '@astrojs/prism';
---

<Prism lang="js" code={`const foo = 'bar';`} />

Internal

This package exports a runHighlighterWithAstro function to highlight while making sure the Astro language is loaded beforehand

import { runHighlighterWithAstro } from '@astrojs/prism';

runHighlighterWithAstro(
  `
  ---
    const helloAstro = 'Hello, Astro!';
  ---

  <div>{helloAstro}</div>
`,
  'astro',
);

Keywords

astro

FAQs

Package last updated on 18 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts