0.9.0 • Published 3 years ago

@djgrant/react-code-input v0.9.0

Weekly downloads
16
License
MIT
Repository
-
Last release
3 years ago

react-code-input

A lightweight component that turns <input type="text" /> 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 →

Quick start

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

export default () => (
  <CodeInput
    placeholder="price - vat"
    symbols={["price", "vat"]}
    customInputComponent={MyInput}
    style={{ width: "300px" }}
    onChange={event => {
      console.log(event.tokens);
      console.log(event.currentTarget.value);
    }}
  />
);
0.9.0

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.8.2

3 years ago

0.7.0

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.2

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.4.5

3 years ago

0.4.4

3 years ago

0.4.7

3 years ago

0.4.6

3 years ago

0.4.3

3 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago