DS0
Components

RichText

Rich text editing with formatting toolbar and contentEditable area.

Overview

RichText provides a WYSIWYG editor with a formatting toolbar. Supports bold, italic, underline, headings, lists, links, and more using a contentEditable area.

Usage

<RichText
  value={content}
  onChange={setContent}
  placeholder="Start writing..."
/>

API Reference

PropTypeDefaultDescription
valuestring''HTML content
onChange(value: string) => voidContent change handler
placeholderstringEmpty state placeholder
toolbarstring[]All toolsToolbar buttons to show
readOnlybooleanfalseRead-only mode

Accessibility

  • Toolbar buttons have aria-label descriptions
  • Editor area has role="textbox" and aria-multiline="true"
  • Supports keyboard shortcuts (⌘B for bold, etc.)
ComponentWhen to Use Instead
TextAreaPlain text multi-line input
CodeBlockCode display with highlighting

On this page