Skip to content
AI & AgentsPro

Slash Command Menu

The popover that opens when someone types / in the prompt: commands with a short description, filtered as they type.

Usage

/summarizeSum up the thread in five bullets
/explainExplain the selected code
/testWrite tests for the open file
/translateTranslate the reply
/docsSearch the WunderUI docs

↑↓ to move · ↵ to run · esc to close

Installation

bash
npm install @wunderui/react

Then import what you need:

tsx
import { SlashCommandMenu } from "@wunderui/react"

Examples

Default

Right after typing /.

/summarizeSum up the thread in five bullets
/explainExplain the selected code
/testWrite tests for the open file
/translateTranslate the reply
/docsSearch the WunderUI docs

↑↓ to move · ↵ to run · esc to close

Filtered

The text after the slash narrows the list.

/testWrite tests for the open file
/translateTranslate the reply

↑↓ to move · ↵ to run · esc to close

In context

How the component is used inside real screens — the same compositions as the Usage section of the Figma page.

Slash command composer

Typing / opens the menu above the prompt. Arrow keys move, Enter runs the command, Esc closes the menu.

/testWrite tests for the open file
/translateTranslate the reply

↑↓ to move · ↵ to run · esc to close

API Reference

PropTypeDefault
commands{ name: string; description?: string; icon?: ReactNode }[]—
querystring""
activeIndex / onActiveIndexChangenumber / (index: number) => void0
onSelect(command) => void—