Components
Client Only
Installation
pnpm dlx @docyrus/cli add @docyrus/ui-simple-markdown-editorRequired Packages(1 package)
pnpm add overtypeUsage
import {
SimpleMarkdownEditor
} from "@docyrus/ui/components/simple-markdown-editor";
<SimpleMarkdownEditor
variant="default"
size="sm"
ref={...}
value="..."
defaultValue="..."
onValueChange={() => {}}
textareaProps={...}
/>Variants
| Variant | Description |
|---|---|
default | Default style |
muted | Muted — border-border/70 bg-muted/20 |
Sizes
| Size | Description |
|---|---|
sm | Small — text-sm |
default | Default — text-sm |
lg | Large — text-base |
API Reference
| Prop | Type | Default |
|---|---|---|
variant | "default" | "muted" | "default" |
size | "sm" | "default" | "lg" | "default" |
ref | Ref<SimpleMarkdownEditorRef> | — |
value | string | — |
defaultValue | string | — |
onValueChange | (value: string) => void | — |
resizable | boolean | false |
textareaProps | OverTypeOptions['textareaProps'] | — |
className | string | — |