Pipeline
- Docsusage, props, keywords
- Demosrc/demo.tsx
- Buildshadcn add → vite
- Capturelight, dark, motion
- IndexBM25 + vectors
Public log. Prompts, raw model errors and costs stay on the admin side.
Log
Demo source
src/demo.tsx · from an earlier run
import { useRef, useState } from "react"import { MentionSuggestions, type MentionUser } from "@/components/motiq/mention-suggestions"import { Textarea } from "@/components/ui/textarea"const people: MentionUser[] = [ { id: "mira", name: "Mira Delacroix", handle: "@mira", role: "Product", presence: "online" }, { id: "marcus", name: "Marcus Chen", handle: "@marcus", role: "Engineering", presence: "away" }, { id: "maya", name: "Maya Patel", handle: "@maya", role: "Design", presence: "dnd" }, { id: "malik", name: "Malik Johnson", handle: "@malik", role: "Support", presence: "offline", disabled: true, disabledReason: "Not in this channel", },]export default function MentionSuggestionsDemo() { const inputRef = useRef<HTMLTextAreaElement>(null) const containerRef = useRef<HTMLDivElement>(null) const [text, setText] = useState("Thanks for the review, @m") const [open, setOpen] = useState(true) const match = text.match(/@(\w*)$/) const query = match ? match[1] : "" return ( <div ref={containerRef} className="relative w-full max-w-md"> <Textarea ref={inputRef} value={text} onChange={(e) => { setText(e.target.value) setOpen(true) }} placeholder="Write a message..." className="min-h-24 resize-none" /> <MentionSuggestions open={open && match !== null} query={query} items={people} inputRef={inputRef} container={containerRef} onOpenChange={setOpen} onSelect={(item, ctx) => { setText((t) => t.replace(/@\w*$/, ctx.value + " ")) setOpen(false) }} /> </div> )}