Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/djgrant/react-code-input

Turn <input /> into a mini code editor
https://github.com/djgrant/react-code-input

Last synced: 12 days ago
JSON representation

Turn <input /> into a mini code editor

Awesome Lists containing this project

README

        

# react-code-input

A lightweight component that turns `` into a mini code editor.

Provides basic tokenisation, parsing, syntax highlighting, validation and code completion for simple code expressions.

There are zero dependencies and you can style the input in any way that you want.

[View examples →](http://react-code-input.netlify.app)

## Quick start

```tsx
import { CodeInput } from "@djgrant/react-code-input";

export default () => (
{
console.log(event.tokens);
console.log(event.currentTarget.value);
}}
/>
);
```