009
A writing surface where typing / opens a command menu right at the caret, narrows as you type and drops in a styled block: heading, to-do, callout, code and more.
akaslash command·block editor·command menu
Run this in any project set up for the shadcn CLI. It copies the Slash Menu source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/slash-menu.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { SlashMenu } from "@/components/slash-menu";
export default function Page() {
return <SlashMenu />;
}A free React component in the Conversation collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Slash Menu source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| title | string | "Offsite, Lisbon" |
| defaultBlocks | SlashBlock[] | — |
| commands | SlashCommand[] | defaultCommands |
| onChange | (blocks: SlashBlock[]) => void | — |
| className | string | — |