Kits
MarkdownEditor
BetaBeta — the props contract is close to final, but small breaking changes can still land.Compose Markdown with draggable blocks, slash commands, people mentions, formatting, and application-owned image uploads.
Composition
Markdown composition
Markdown strings stay application-owned. Content includes block drag handles (Alt+ArrowUp/ArrowDown also moves blocks). Suggestions adds slash commands and accepts people with persistent profile URLs; mentions save as Markdown links. Supply onUploadImage to enable image paste and drop.
- <MarkdownEditor>
- <MarkdownEditorToolbar />
- <MarkdownEditorContent />
- <MarkdownEditorSuggestions />
- <MarkdownEditorUploads />
Installation
Use this command to install the component.
Usage
Dependencies
Context
src/registry/sources/control-ui/markdown-editor/context.tsSupportBlock drag handle
src/registry/sources/control-ui/markdown-editor/drag-handle.tsxSupportDrag preview
src/registry/sources/control-ui/markdown-editor/drag-preview.tsSupportExtensions
src/registry/sources/control-ui/markdown-editor/extensions.tsSupportSlash commands and mentions
src/registry/sources/control-ui/markdown-editor/suggestions.tsxSupportTask item
src/registry/sources/control-ui/markdown-editor/task-item.tsxSupportFormatting and images
src/registry/sources/control-ui/markdown-editor/toolbar.tsxSupportUploads
src/registry/sources/control-ui/markdown-editor/uploads.tsSupportUse image uploads
src/registry/sources/control-ui/markdown-editor/use-image-uploads.tsSupportLabel
Buttonsrc/registry/sources/control-ui/ui/label.tsxSupportbuttonPrimitiveChatComposerAttachmentchat-composer-attachmentComponentCheckboxcheckboxPrimitiveDropdownMenudropdown-menuPrimitiveInputinputPrimitiveLive statuslive-statusPrimitivePopoverpopoverPrimitiveScroll areascroll-areaPrimitiveTextareatextareaPrimitiveToolbartoolbarPrimitiveTooltiptooltipPrimitiveTrigger Menutrigger-menuPrimitiveTypographytypographyPrimitiveRaw code
Installed component source and support files
Knobs
Typed custom properties the recipe paints with. Set one on the root — style, a utility class, or a skin — and every slot inherits it.
--cui-markdown-editor-* · 12 knobsHow the cascade resolves--cui-markdown-editor-background<color>var(--background)--cui-markdown-editor-foreground<color>var(--foreground)--cui-markdown-editor-border-color<color>var(--border)--cui-markdown-editor-radius<length-percentage>var(--radius-panel)--cui-markdown-editor-padding<length-percentage>calc(var(--spacing) * 4)--cui-markdown-editor-gutter-size<length-percentage>var(--control-h-xs)--cui-markdown-editor-min-height<length-percentage>calc(var(--spacing) * 32)--cui-markdown-editor-max-height<length-percentage>60dvh--cui-markdown-editor-gap<length-percentage>calc(var(--spacing) * 3)--cui-markdown-editor-muted-foreground<color>var(--muted-foreground)--cui-markdown-editor-code-background<color>var(--muted)--cui-markdown-editor-border-width<length>var(--control-rim-width)--cui-label-* · 1 knobsHow the cascade resolves--cui-label-root-foreground<color>var(--foreground)