Documentation Index
Fetch the complete documentation index at: https://react.email/docs/llms.txt
Use this file to discover all available pages before exploring further.
Quick start
AddSlashCommand with the default command set:
/ in the editor to open the command menu. Use arrow keys to navigate and Enter to select.
Default commands
ThedefaultSlashCommands array includes these built-in commands:
| Command | Category | Description |
|---|---|---|
TEXT | Text | Plain text block |
H1 | Text | Large heading |
H2 | Text | Medium heading |
H3 | Text | Small heading |
BULLET_LIST | Text | Unordered list |
NUMBERED_LIST | Text | Ordered list |
QUOTE | Text | Block quote |
CODE | Text | Code snippet |
BUTTON | Layout | Clickable button |
DIVIDER | Layout | Horizontal separator |
SECTION | Layout | Content section |
TWO_COLUMNS | Layout | Two column layout |
THREE_COLUMNS | Layout | Three column layout |
FOUR_COLUMNS | Layout | Four column layout |
Adding custom commands
Create aSlashCommandItem and include it in the items array:
SlashCommandItem interface:
Display name shown in the command list.
Help text shown below the title.
Icon displayed next to the command.
Category for grouping commands in the list.
Additional terms for fuzzy search matching.
Function called when the command is selected. Receives the editor instance and the range to replace.
Using individual commands
You can cherry-pick from the default commands to show only specific options:Controlling visibility
Character that triggers the command menu.
Function to control when the command menu can appear. Return
false to prevent it.Examples
See slash commands in action with a runnable example:Slash Commands
Default commands plus a custom Greeting command.