
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
react-code-block
Advanced tools
Set of unstyled UI components to build powerful code blocks in React.
npm i react-code-block prism-react-renderer
Continue with basic example here →
You can find the complete documentation at react-code-block.netlify.app
Let's face it, building code blocks is hard! There are various libraries out there that handle syntax highlighting, but then you realize that you need more than just syntax highlighting. If you are writing a technical blog or documentation, chances are you need features like line numbers, line highlighting, word highlighting and so on. Most of the syntax highlighting libraries don't come with this out-of-the-box, so you have to spend time implementing all this by yourself. Or if they do come with these features, it's incredibly hard to extend and style them according to the way you want it to be.
React Code Block solves all these problems by only providing you with the core functionality without any of the styling. You can compose the primitive components from this library to build any kind of code block you need.
React Code Block uses an existing syntax highlighting library under the hood for syntax highlighting. On top of this, it adds additional features like line numbers, line highlighting, etc. which can be styled through the primitive components this package exposes. Currently supported syntax highlighted libraries:
React Code Block is MIT Licensed.
FAQs
Set of unstyled UI components to build powerful code blocks in React.
The npm package react-code-block receives a total of 5,122 weekly downloads. As such, react-code-block popularity was classified as popular.
We found that react-code-block demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.