Description
yace is a code editor for the browser that weighs under 2 KB gzipped, with zero dependencies and no framework lock-in. It is built on a native textarea, so the editor behaves like a plain text field, and you pass it a DOM node, which lets it sit inside React and other frameworks. Syntax highlighting is up to you. You can bring highlight.js, Prism or Shiki, or use the highlighters bundled in yace/highlighters. Plugins add behaviour such as tab handling, history, indenting and cut line, and you can write your own plugin in a few lines. The examples show the bundled highlighter, highlight.js and Prism as highlighters, a custom highlighter, a markdown editor with code highlighting, plugins, shimmer and glitch decorations, and an LLM tokenizer view. You install it from npm with npm install yace. The site says the core is gzipped with no supply-chain surface. The project is MIT licensed and its source is on GitHub.…
Highlights
- Under 2 KB gzipped with zero dependencies
- Native textarea under the hood, with no framework lock-in
- Bring any highlighter: highlight.js, Prism or Shiki
- Plugins for tab, history, indent and cut line
- Works with React and other frameworks through a DOM node
Ratings & Reviews
No ratings yet
Be the first to rate Yace.
People also visit
Prism code editor
Lightweight, extensible code editor component for the web using Prism
Yace FAQ
What is yace?
yace is a small code editor for the browser. It is built on a native textarea and weighs under 2 KB gzipped.
How do I install it?
Run npm install yace in your project.
Can I use my own syntax highlighting?
Yes. The site shows highlight.js, Prism and Shiki as highlighters, and you can write your own.
Does it work with React?
Yes. You pass yace a DOM node, so it plays nicely with React and other frameworks.
What license is it under?
MIT. The source code is on GitHub.
What are the best Yace alternatives?
Popular alternatives to Yace include React Textarea Code Editor, Code Input and Prism code editor. See all Yace alternatives
