Skip to content

CodeEditor

Code editor with syntax highlighting.

Import

tsx
import { ZCodeEditor } from "@zurto/ui";

Usage

tsx
<ZCodeEditor value={code} onChange={setCode} language="typescript" />

Props

PropTypeDefaultDescription
valuestringCode content
onChange(value: string) => voidChange handler
languagestring'javascript'Syntax language
lineNumbersbooleantrueShow line numbers
readOnlybooleanfalseRead-only mode

Released under the MIT License.