data-re-* attributes
as stable styling hooks, and a set of CSS custom properties (--re-*) control the entire color scheme.
CSS variables
The default theme defines these CSS custom properties on:root. Override them on any parent
element to restyle the editor:
Color variables
| Variable | Description | Light default | Dark default |
|---|---|---|---|
--re-bg | Background color | #fff | #1c1c1c |
--re-border | Border color | #e5e5e5 | #2e2e2e |
--re-text | Primary text color | #1c1c1c | #ececec |
--re-text-muted | Secondary/muted text | #6b6b6b | #a0a0a0 |
--re-hover | Hover background | rgba(0,0,0,0.04) | rgba(255,255,255,0.06) |
--re-active | Active/click background | rgba(0,0,0,0.06) | rgba(255,255,255,0.09) |
--re-pressed | Pressed/toggled background | rgba(0,0,0,0.06) | rgba(255,255,255,0.09) |
--re-separator | Separator line color | #e5e5e5 | #2e2e2e |
--re-danger | Destructive action color | #dc2626 | #f87171 |
--re-danger-hover | Destructive hover background | rgba(220,38,38,0.1) | rgba(248,113,113,0.15) |
Dimension variables
| Variable | Description | Default |
|---|---|---|
--re-radius | Border radius for containers (menus, dropdowns) | 0.75rem |
--re-radius-sm | Border radius for buttons and items | 0.5rem |
--re-shadow | Box shadow for floating elements | 0 10px 15px -3px rgba(0,0,0,0.1), ... |
Dark mode
The default theme supports dark mode in two ways: Automatic — viaprefers-color-scheme:
.dark class on any ancestor:
next-themes).
Data attribute selectors
Every UI component usesdata-re-* attributes as stable CSS hooks. These are the recommended
way to target specific parts of the editor UI.
Bubble menu
data-item values: bold, italic, underline, strike, code, uppercase,
align-left, align-center, align-right.
Node selector
The block type dropdown inside the bubble menu:Link selector
The link popover inside the bubble menu:Link bubble menu
The standalone menu that appears when clicking a link:Button bubble menu
The menu that appears when clicking an email button:Image bubble menu
The menu that appears when clicking an image:Slash command
Editor content classes
The editor content area uses the.tiptap root class from TipTap. Target content elements with
.tiptap as a prefix:
Typography
Layout and structure
Text alignment
The alignment attribute renders as an HTML attribute on block nodes:Column data types
Column layouts also usedata-type attributes: