Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/djgrant/react-code-input
- Owner: djgrant
- License: mit
- Created: 2020-10-16T21:52:13.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-18T13:15:43.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T00:37:52.030Z (28 days ago)
- Language: TypeScript
- Homepage: https://code-input.vercel.app
- Size: 520 KB
- Stars: 13
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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);
}}
/>
);
```