Theme

Start Here

Start from the smallest working snippet, then move to interactive examples and the full API contract below.

Styled quick start

Copy this entrypoint first. It includes the imports required to get the component on screen.

svelte
<script lang="ts">
  import '@dryui/ui/themes/default.css';
  import '@dryui/ui/themes/dark.css';
  import { RichTextEditor } from '@dryui/ui';
</script>

<RichTextEditor.Root>
  <RichTextEditor.Toolbar>...</RichTextEditor.Toolbar>
  <RichTextEditor.Content>...</RichTextEditor.Content>
</RichTextEditor.Root>

Import options

Root package

ts
import { RichTextEditor } from '@dryui/ui'

Per-component subpath

ts
import { RichTextEditor } from '@dryui/ui/rich-text-editor'

Customize

Use the interactive examples to see common variants, states, and composition patterns before building your own.

Basic Editor

With Initial Value

svelte
<RichTextEditor.Root value="<p>Initial <strong>content</strong> here.</p>">
  <RichTextEditor.Toolbar />
  <RichTextEditor.Content />
</RichTextEditor.Root>

Readonly

svelte
<RichTextEditor.Root value="<p>This content is <strong>readonly</strong>.</p>" readonly>
  <RichTextEditor.Content />
</RichTextEditor.Root>

Structure

Compound components always start with RichTextEditor.Root. Use this structure block to understand required wrappers before you wire state or styling.

RichTextEditor.Root
  RichTextEditor.Toolbar
  RichTextEditor.Content
RichTextEditor.Root RichTextEditor.ToolbarRichTextEditor.Content

Compose

The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.

Compound component. Start with RichTextEditor.Root, then add only the parts you need.

RichTextEditor.ToolbarRichTextEditor.Content

RichTextEditor.Root

Prop Type Default Required Bindable
value
string
''
placeholder
string
readonly
boolean
children
Snippet

Forwards <div> attributes via rest props. Common examples: id, style, role.

RichTextEditor.Toolbar

Prop Type Default Required Bindable

Forwards <div> attributes via rest props. Common examples: id, style, role.

RichTextEditor.Content

Prop Type Default Required Bindable

Forwards <div> attributes via rest props. Common examples: id, style, role.