Slash commands are an AI UX pattern where typing "/" in the composer opens a menu of quick actions, templates, or model switches. They give power users keyboard-first access to capabilities without leaving the input field or navigating menus, and are common in chat, coding, and productivity tools.
Perfect for IDEs, productivity tools, and developer environments where power users need quick keyboard-first access to AI models, templates, and actions.
| Product | Implementation |
|---|---|
| Slack | Slash commands trigger integrations and actions like /remind or /poll from the message box. |
| Notion | Typing "/" opens a block-type and AI-action menu inline in the document. |
| Discord | Slash commands expose bot and app actions with argument autocomplete. |
| Midjourney | Slash commands like /imagine and /blend are the primary way to invoke generation. |
Copy this prompt to generate a production-ready implementation in Cursor, Claude Code, Lovable, or any AI coding agent.
Generate a production-ready implementation of the "Slash Commands" AI interface design pattern.
Pattern Definition:Slash commands let users type "/" in a chat or composer input to open a menu of quick actions, templates, or model switches, then select one with the keyboard instead of hunting through a settings menu.
Mostly yes. Slash commands reward users who already know the vocabulary of available actions, so they work best as an accelerator layered on top of discoverable buttons, not as the only way to reach a feature.
Slash commands invoke actions or templates; @ mentions reference context like files, people, or agents. Some products use both in the same composer, so distinct trigger characters and menu styling help users tell them apart.
Switch between AI capabilities within composer
Adding context sources via menu with removable chips
Switch between text, voice, and dictation modes
Suggested next turns
Cmd+K for AI
Reference files via @