Skip to content
AI Interfaces block

Editor Slash Menu

The "/" menu inside a document: focus never leaves the editor, every row names what it acts on, and Escape cleans up the trigger text it inserted instead of leaving you to backspace it.

343 lineslucide-reactAdded 27 Aug 2026Updated 11 Sept 2026
  • ai
  • editor
  • slash
  • combobox
  • inline

What's included

  • components/ai-slash-menu.tsx
  • Needs lucide-react

Works with

  • React
  • Next.js
  • Tailwind CSS
  • TypeScript

npx hoverlab add ai-slash-menu

Or over MCP, from your editor's agent — no account needed.

License

Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.

Was this useful?

Start a page with this section — add more, order them, and leave with the page source.

Preview

Release notes — draft

Type / for actions

Rewritethis paragraph
Summarisethe whole document
Continue writingfrom the caret
Translatethis paragraph into French
Turn into a tablethe list above
Draft a briefa new section below

Escape removes the slash and anything typed after it — it does not leave you to clean up.

Rendered live in your current theme — this is the same component whose source is below, not a screenshot of it.

Source

components/ai-slash-menu.tsx
'use client'

/**
 * <AiSlashMenu> — the "/" menu inside the editor, without stealing the caret.
 *
 * Inline AI Actions had the ghost suggestion, the selection toolbar, the
 * insight cards and the inspector — all of them things that appear *after*
 * you have written something. The slash menu is the opposite end: it is
 * how a person asks for an action before there is any text to act on, and
 * it is the surface a command palette cannot be. A palette is a modal over
 * the document; this one has to leave the caret where it was, because the
 * caret is the argument.
 *
 * THE ONE THING THIS GETS RIGHT THAT MOST DO NOT
 *
 * Focus never moves. The list is not focusable; the textarea keeps focus
 * the whole time and points at the highlighted option with
 * `aria-activedescendant`. Arrow keys are intercepted only while the menu
 * is open, so the moment it closes they go back to moving the caret. Every
 * slash menu that puts DOM focus in the popup breaks typing: the next
 * character lands in nothing, and a screen reader loses the editing
 * context it just announced.
 *
 * THE QUERY IS REAL TEXT, SO CLOSING HAS TO CLEAN UP
 *
 * "/rew" is in the document. It is not a floating input, however much it
 * behaves like one. So Escape deletes the trigger and its query rather
 * than just hiding the popup — otherwise the person is left with a stray
 * "/rew" they have to notice and backspace, which is the single most
 * common bug in shipped implementations. Selecting an item replaces the
 * same span.
 *
 * IT SAYS WHAT WILL HAPPEN TO WHAT
 *
 * Each row names its target: this paragraph, the whole document, the
 * selection. An action list that reads "Improve writing / Summarise /
 * Translate" is only unambiguous to the person who built it.
 *
 * A NOTE ON POSITION: this anchors under the editor. A production build
 * anchors to the caret rectangle, which in a textarea means measuring a
 * mirror element — a hidden div with the same font, padding and width,
 * holding the text up to the caret — and reading the offset of a span at
 * its end. That is a real technique, not a shortcut; contenteditable gets
 * it free from `getClientRects()`, and the choice between the two is the
 * actual decision behind this component.
 *
 * ACCESSIBILITY: `role="combobox"` on the textarea with `aria-expanded`
 * and `aria-controls`, `role="listbox"` on the popup and `role="option"`
 * with `aria-selected` on the rows. Hovering does not change the active
 * option — pointer and keyboard fighting over one highlight is how people
 * run an action they did not choose.
 */

import * as React from 'react'
import {
  CornerDownLeft,
  FileText,
  Languages,
  ListTree,
  Sparkles,
  Table,
  Wand2,
} from 'lucide-react'

export interface SlashAction {
  id: string
  label: string
  /** What it acts on — named per row, not assumed. */
  target: string
  keywords: string
  icon: React.ComponentType<{ className?: string }>
  /** Text it drops at the caret, so the demo does something real. */
  result: string
}

export interface AiSlashMenuProps {
  actions?: SlashAction[]
  initialText?: string
  className?: string
}

const DEFAULT_ACTIONS: SlashAction[] = [
  {
    id: 'rewrite',
    label: 'Rewrite',
    target: 'this paragraph',
    keywords: 'rewrite improve polish edit',
    icon: Wand2,
    result:
      'Support tickets are answered within one business day, and within four hours on a paid plan.',
  },
  {
    id: 'summarise',
    label: 'Summarise',
    target: 'the whole document',
    keywords: 'summarise summary tldr shorten',
    icon: ListTree,
    result:
      'In short: one-day replies as standard, four hours on paid plans, no queue after hours.',
  },
  {
    id: 'continue',
    label: 'Continue writing',
    target: 'from the caret',
    keywords: 'continue write more draft',
    icon: Sparkles,
    result:
      ' Outside those hours the queue is held rather than auto-answered, so nobody gets a reply written by a robot at 3am.',
  },
  {
    id: 'translate',
    label: 'Translate',
    target: 'this paragraph into French',
    keywords: 'translate french language',
    icon: Languages,
    result:
      'Les demandes d’assistance reçoivent une réponse sous un jour ouvré.',
  },
  {
    id: 'table',
    label: 'Turn into a table',
    target: 'the list above',
    keywords: 'table grid rows columns convert',
    icon: Table,
    result: '| Plan | First reply |\n| --- | --- |\n| Free | 1 business day |\n| Paid | 4 hours |',
  },
  {
    id: 'brief',
    label: 'Draft a brief',
    target: 'a new section below',
    keywords: 'brief outline plan section',
    icon: FileText,
    result: '## Support commitments\n\n- First reply targets\n- Out-of-hours policy\n- Escalation path',
  },
]


export function AiSlashMenu({
  actions = DEFAULT_ACTIONS,
  /*
    Ends with the trigger on purpose, so the block opens showing the thing
    it is about. A demo of a slash menu whose slash menu is shut is a demo
    of a textarea.
  */
  initialText = 'Our support team replies to every ticket. /',
  className = '',
}: AiSlashMenuProps) {
  /*
    Per-instance prefix for every id this block emits.

    The literals these replaced were a latent duplicate the moment the
    block appeared twice on one document, and `aria-labelledby` on a
    duplicated id resolves to the first match -- so the second copy was
    labelled by the first copy's heading. Client component, so `useId` is
    the right tool.
  */
  const uid = React.useId()

  const [text, setText] = React.useState(initialText)
  const [triggerAt, setTriggerAt] = React.useState<number | null>(() =>
    initialText.endsWith('/') ? initialText.length - 1 : null,
  )
  const [active, setActive] = React.useState(0)
  const editor = React.useRef<HTMLTextAreaElement>(null)

  /* The query is the document text between the "/" and the caret. */
  const query = triggerAt === null ? '' : text.slice(triggerAt + 1)
  const open = triggerAt !== null
  const matches = React.useMemo(() => {
    const q = query.trim().toLowerCase()
    if (!q) return actions
    return actions.filter(
      (a) => a.label.toLowerCase().includes(q) || a.keywords.includes(q),
    )
  }, [actions, query])

  React.useEffect(() => setActive(0), [query])

  const closeAndClean = () => {
    /* Escape removes the trigger it inserted — see the note above. */
    if (triggerAt !== null) setText((t) => t.slice(0, triggerAt))
    setTriggerAt(null)
    editor.current?.focus()
  }

  const apply = (action: SlashAction) => {
    setText((t) => (triggerAt === null ? t : t.slice(0, triggerAt) + action.result))
    setTriggerAt(null)
    editor.current?.focus()
  }

  const onChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {
    const next = event.target.value
    const caret = event.target.selectionStart
    setText(next)
    if (triggerAt === null) {
      /* Only at the start of a word — "and/or" must not open a menu. */
      const typed = next[caret - 1]
      const before = next[caret - 2]
      if (typed === '/' && (before === undefined || before === ' ' || before === '\n')) {
        setTriggerAt(caret - 1)
      }
      return
    }
    if (caret <= triggerAt || next[triggerAt] !== '/') setTriggerAt(null)
  }

  const onKeyDown = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {
    /* Arrow keys belong to the caret unless the menu is open. */
    if (!open) return
    if (event.key === 'ArrowDown') {
      event.preventDefault()
      setActive((i) => (matches.length ? (i + 1) % matches.length : 0))
    } else if (event.key === 'ArrowUp') {
      event.preventDefault()
      setActive((i) => (matches.length ? (i - 1 + matches.length) % matches.length : 0))
    } else if (event.key === 'Enter' && matches[active]) {
      event.preventDefault()
      apply(matches[active])
    } else if (event.key === 'Escape') {
      event.preventDefault()
      closeAndClean()
    }
  }

  return (
    /*
      Deep bottom padding, not a stray value: the popup is absolutely
      positioned, so it adds nothing to the section's height, and any
      container with `overflow: hidden` — including the preview frame on
      this site — clips whatever hangs past it. Reserve the room where the
      menu opens.
    */
    <section className={`mx-auto w-full max-w-2xl px-4 pb-36 pt-16 sm:px-6 ${className}`}>
      <div className="rounded-2xl border border-border bg-card p-4 sm:p-5">
        <div className="flex items-center justify-between">
          <h2 className="text-sm font-semibold text-foreground">Release notes — draft</h2>
          <p className="text-xs text-muted-foreground">
            Type <kbd className="rounded border border-border bg-muted px-1 font-mono">/</kbd>{' '}
            for actions
          </p>
        </div>

        <div className="relative mt-3">
          <label htmlFor={`${uid}-slash-editor`} className="sr-only">
            Document body
          </label>
          <textarea
            id={`${uid}-slash-editor`}
            ref={editor}
            value={text}
            onChange={onChange}
            onKeyDown={onKeyDown}
            rows={3}
            role="combobox"
            aria-expanded={open}
            aria-controls={`${uid}-slash-menu-listbox`}
            aria-autocomplete="list"
            aria-activedescendant={
              open && matches[active] ? `slash-option-${matches[active].id}` : undefined
            }
            className="w-full resize-y rounded-xl border border-field bg-background px-3 py-2.5 font-sans text-sm leading-relaxed text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
            placeholder="Write something, or press / to ask for help"
          />

          {open ? (
            <div
              /*
                Not focusable, and no tabindex anywhere in here. The caret
                stays in the textarea for the whole life of this popup.
              */
              id={`${uid}-slash-menu-listbox`}
              role="listbox"
              aria-label="AI actions"
              className="absolute inset-x-0 top-full z-10 mt-1 max-h-48 overflow-y-auto rounded-xl border border-border bg-popover p-1 shadow-lg"
            >
              {matches.length === 0 ? (
                <p className="px-3 py-6 text-center text-sm text-muted-foreground">
                  Nothing matches &ldquo;{query}&rdquo;. Press Escape to keep typing
                  normally.
                </p>
              ) : (
                matches.map((action, i) => {
                  const Icon = action.icon
                  const isActive = i === active
                  return (
                    <div
                      key={action.id}
                      id={`${uid}-slash-option-${action.id}`}
                      role="option"
                      aria-selected={isActive}
                      /*
                        Click applies; hover deliberately does not move the
                        highlight. Pointer and keyboard fighting over one
                        selection runs actions nobody chose.
                      */
                      onMouseDown={(event) => {
                        event.preventDefault()
                        apply(action)
                      }}
                      className={`flex cursor-pointer items-center gap-3 rounded-lg px-2.5 py-2 ${
                        isActive ? 'bg-accent text-accent-foreground' : 'text-foreground'
                      }`}
                    >
                      <span
                        aria-hidden
                        className="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground"
                      >
                        <Icon className="h-3.5 w-3.5" />
                      </span>
                      <span className="min-w-0 flex-1">
                        <span className="block truncate text-sm font-medium">
                          {action.label}
                        </span>
                        {/* Names its target, so no row is ambiguous. */}
                        <span className="block truncate text-xs text-muted-foreground">
                          {action.target}
                        </span>
                      </span>
                      {isActive ? (
                        <CornerDownLeft
                          aria-hidden
                          className="h-3.5 w-3.5 shrink-0 text-muted-foreground"
                        />
                      ) : null}
                    </div>
                  )
                })
              )}
            </div>
          ) : null}
        </div>

        <p className="mt-3 text-xs text-muted-foreground">
          {open
            ? 'Escape removes the slash and anything typed after it — it does not leave you to clean up.'
            : 'Nothing has been sent anywhere yet. Actions run on the paragraph the caret is in.'}
        </p>
      </div>
    </section>
  )
}

Before you paste

  • Styling is Tailwind utility classes on semantic tokens (bg-card, text-muted-foreground) — it inherits your theme instead of overriding it.
  • Install: npm i lucide-react
  • Every prop has a default, so it renders standalone before you wire it up.

Where it goes

Drop it at components/ai-slash-menu.tsx and import it where you need the section:

import { AiSlashMenu } from '@/components/ai-slash-menu'

Customize

1 of this block’s props are simple enough to drive from here. Change them and the block below re-renders — it is the same component whose source is above, not a mock of it. Everything else it accepts is in the table underneath.

Props

Read out of the component’s own type and signature, so this cannot drift from the source below. Every prop has a default — the component renders standalone before you pass it anything.

PropTypeDefault
actionsSlashAction[]DEFAULT_ACTIONS
initialTextstring'Our support team replies to every ticket. /'
classNamestring''

Not using React?

The same block rendered once to markup, wrapped as a file your framework compiles. Tailwind classes are framework-agnostic, so the design transfers intact — the behaviour does not.

This block is interactive. The markup below is its initial state with the event handlers stripped — you will need to re-wire the behaviour in your framework.

ai-slash-menu.html
<!--
  Editor Slash Menu — markup from the Hoverlab catalog.

  This is the block rendered once to HTML and wrapped as a component
  file. It is not a port of the React source: the Tailwind classes carry
  the design, which is the part that took the work, and they are the same
  in every framework.

  This block is interactive in React and the handlers are NOT here.
  Buttons, toggles and menus render in their initial state and do
  nothing until you wire them up.
-->
<section class="mx-auto w-full max-w-2xl px-4 pb-36 pt-16 sm:px-6 ">
  <div class="rounded-2xl border border-border bg-card p-4 sm:p-5">
    <div class="flex items-center justify-between">
      <h2 class="text-sm font-semibold text-foreground">Release notes — draft</h2>
      <p class="text-xs text-muted-foreground">Type <kbd class="rounded border border-border bg-muted px-1 font-mono">/</kbd> for actions</p>
    </div>
    <div class="relative mt-3">
      <label for="_R_0_-slash-editor" class="sr-only">Document body</label>
      <textarea id="_R_0_-slash-editor" rows="3" role="combobox" aria-expanded="true" aria-controls="_R_0_-slash-menu-listbox" aria-autocomplete="list" aria-activedescendant="slash-option-rewrite" class="w-full resize-y rounded-xl border border-field bg-background px-3 py-2.5 font-sans text-sm leading-relaxed text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background" placeholder="Write something, or press / to ask for help">Our support team replies to every ticket. /</textarea>
      <div id="_R_0_-slash-menu-listbox" role="listbox" aria-label="AI actions" class="absolute inset-x-0 top-full z-10 mt-1 max-h-48 overflow-y-auto rounded-xl border border-border bg-popover p-1 shadow-lg">
        <div id="_R_0_-slash-option-rewrite" role="option" aria-selected="true" class="flex cursor-pointer items-center gap-3 rounded-lg px-2.5 py-2 bg-accent text-accent-foreground">
          <span aria-hidden="true" class="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground">
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-wand-sparkles h-3.5 w-3.5" aria-hidden="true">
              <path d="m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72"></path>
              <path d="m14 7 3 3"></path>
              <path d="M5 6v4"></path>
              <path d="M19 14v4"></path>
              <path d="M10 2v2"></path>
              <path d="M7 8H3"></path>
              <path d="M21 16h-4"></path>
              <path d="M11 3H9"></path>
            </svg>
          </span>
          <span class="min-w-0 flex-1">
            <span class="block truncate text-sm font-medium">Rewrite</span>
            <span class="block truncate text-xs text-muted-foreground">this paragraph</span>
          </span>
          <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-corner-down-left h-3.5 w-3.5 shrink-0 text-muted-foreground" aria-hidden="true">
            <path d="M20 4v7a4 4 0 0 1-4 4H4"></path>
            <path d="m9 10-5 5 5 5"></path>
          </svg>
        </div>
        <div id="_R_0_-slash-option-summarise" role="option" aria-selected="false" class="flex cursor-pointer items-center gap-3 rounded-lg px-2.5 py-2 text-foreground">
          <span aria-hidden="true" class="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground">
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-list-tree h-3.5 w-3.5" aria-hidden="true">
              <path d="M21 12h-8"></path>
              <path d="M21 6H8"></path>
              <path d="M21 18h-8"></path>
              <path d="M3 6v4c0 1.1.9 2 2 2h3"></path>
              <path d="M3 10v6c0 1.1.9 2 2 2h3"></path>
            </svg>
          </span>
          <span class="min-w-0 flex-1">
            <span class="block truncate text-sm font-medium">Summarise</span>
            <span class="block truncate text-xs text-muted-foreground">the whole document</span>
          </span>
        </div>
        <div id="_R_0_-slash-option-continue" role="option" aria-selected="false" class="flex cursor-pointer items-center gap-3 rounded-lg px-2.5 py-2 text-foreground">
          <span aria-hidden="true" class="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground">
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sparkles h-3.5 w-3.5" aria-hidden="true">
              <path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"></path>
              <path d="M20 3v4"></path>
              <path d="M22 5h-4"></path>
              <path d="M4 17v2"></path>
              <path d="M5 18H3"></path>
            </svg>
          </span>
          <span class="min-w-0 flex-1">
            <span class="block truncate text-sm font-medium">Continue writing</span>
            <span class="block truncate text-xs text-muted-foreground">from the caret</span>
          </span>
        </div>
        <div id="_R_0_-slash-option-translate" role="option" aria-selected="false" class="flex cursor-pointer items-center gap-3 rounded-lg px-2.5 py-2 text-foreground">
          <span aria-hidden="true" class="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground">
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages h-3.5 w-3.5" aria-hidden="true">
              <path d="m5 8 6 6"></path>
              <path d="m4 14 6-6 2-3"></path>
              <path d="M2 5h12"></path>
              <path d="M7 2h1"></path>
              <path d="m22 22-5-10-5 10"></path>
              <path d="M14 18h6"></path>
            </svg>
          </span>
          <span class="min-w-0 flex-1">
            <span class="block truncate text-sm font-medium">Translate</span>
            <span class="block truncate text-xs text-muted-foreground">this paragraph into French</span>
          </span>
        </div>
        <div id="_R_0_-slash-option-table" role="option" aria-selected="false" class="flex cursor-pointer items-center gap-3 rounded-lg px-2.5 py-2 text-foreground">
          <span aria-hidden="true" class="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground">
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table h-3.5 w-3.5" aria-hidden="true">
              <path d="M12 3v18"></path>
              <rect width="18" height="18" x="3" y="3" rx="2"></rect>
              <path d="M3 9h18"></path>
              <path d="M3 15h18"></path>
            </svg>
          </span>
          <span class="min-w-0 flex-1">
            <span class="block truncate text-sm font-medium">Turn into a table</span>
            <span class="block truncate text-xs text-muted-foreground">the list above</span>
          </span>
        </div>
        <div id="_R_0_-slash-option-brief" role="option" aria-selected="false" class="flex cursor-pointer items-center gap-3 rounded-lg px-2.5 py-2 text-foreground">
          <span aria-hidden="true" class="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground">
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-text h-3.5 w-3.5" aria-hidden="true">
              <path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path>
              <path d="M14 2v4a2 2 0 0 0 2 2h4"></path>
              <path d="M10 9H8"></path>
              <path d="M16 13H8"></path>
              <path d="M16 17H8"></path>
            </svg>
          </span>
          <span class="min-w-0 flex-1">
            <span class="block truncate text-sm font-medium">Draft a brief</span>
            <span class="block truncate text-xs text-muted-foreground">a new section below</span>
          </span>
        </div>
      </div>
    </div>
    <p class="mt-3 text-xs text-muted-foreground">Escape removes the slash and anything typed after it — it does not leave you to clean up.</p>
  </div>
</section>
  • This is rendered HTML, not a translation of the React source. The Tailwind classes carry the design and work in any framework.
  • It is one frame: the component in its initial state, with no props applied beyond the defaults.
  • This block is interactive in React — toggles, menus or form state. None of that survives here; the markup is the closed/default state and the handlers are gone. Re-wire them in your own framework.
  • Requires Tailwind, and the design tokens the classes reference (bg-card, text-muted-foreground, and so on). The template ZIPs ship a globals.css that defines them.

What each framework gets across the whole catalog — effects convert properly; this rung is markup.

For AI

The component, its props, the design tokens it expects and the command that installs it — as one prompt. Paste it into Claude, Cursor, v0 or ChatGPT and what they build around it will match the rest of the catalog instead of inventing its own system.

See the prompt

Used in these pages

Want the whole screen instead of this one section? Open a page and copy it entire.

5 more blocks in Inline AI Actions

All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.

Browse Inline AI Actions

Shipping one commercially

Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.

  • A commercial licence for everything in the catalog
  • Unlimited bundle exports, in Vue, Svelte and Tailwind
  • One payment — no subscription, nothing to renew
Pro — $79 once

More Inline AI Actions blocks

View category
Open the full page for this block

Selection Action Toolbar

Highlight a passage and hand it to the model. Positioned from the range rect relative to its container, raised by selectionchange so Shift-Arrow works, and every button prevents the mousedown that would collapse the selection.

Inline AI Actions251 lines1 dep
Open the full page for this block

Ghost Text Completion

Copilot-style completion in a plain textarea: a transparent-caret field over a metric-matched mirror, Tab to accept, Escape that actually sticks, and the suggestion announced rather than left as invisible grey text.

Inline AI Actions206 lines1 dep
Open the full page for this block

Agent-Adjusted Inspector

The model edits real properties and every change is attributed and reversible — per-property provenance in words, per-property revert, and sliders whose aria-valuetext carries the unit.

Inline AI Actions381 lines1 dep
Open the full page for this block

Unprompted Insight Cards

Findings the agent surfaced on its own, paged one at a time, each stating its magnitude rather than its direction, dismissible, and carrying a sparkline that is also a sentence for anyone who cannot see it.

Inline AI Actions284 lines1 dep
Open the full page for this block

Inline AI Action Menu

The actions offered on a selection, each saying whether it rewrites in place or opens a draft beside it.

Inline AI Actions151 linesNo deps