https://github.com/ambar/prism-react-renderer-vars
Use Prism themes with CSS vars to avoid flashing on the initial page load.
https://github.com/ambar/prism-react-renderer-vars
docusaurus prism-react-renderer
Last synced: 6 months ago
JSON representation
Use Prism themes with CSS vars to avoid flashing on the initial page load.
- Host: GitHub
- URL: https://github.com/ambar/prism-react-renderer-vars
- Owner: ambar
- License: mit
- Created: 2023-06-16T08:06:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-16T08:06:14.000Z (over 2 years ago)
- Last Synced: 2025-07-06T11:01:25.867Z (6 months ago)
- Topics: docusaurus, prism-react-renderer
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# prism-react-renderer-vars
Use Prism themes with CSS vars to avoid flashing on the initial page load.
## Install
```
npm install prism-react-renderer-vars
```
## Demo
Use in Docusaurus:
```js
const {light, dark} = require('prism-react-renderer-vars/themes/vs')
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
themeConfig: {
prism: {
theme: light,
darkTheme: dark,
},
},
clientModules: [
require.resolve('prism-react-renderer-vars/themes/vs.css')
],
}
```