Skip to content
Sign upPro
ConversationOpen in chatMenu

Open in chat

Hand the current prompt, page or answer to another assistant, with the prompt shown before it leaves.

A docs page offers to continue the question in the reader's own assistant.

Installation

$ pnpm dlx shadcn@latest add https://chatcn.dev/r/open-in-chat.json

Usage

tsx
import { OpenInChat } from "@/components/ui/chatcn/open-in-chat"

<OpenInChat query={`Read ${pageUrl} and explain how to rotate a signing secret.`} />

The menu lists assistants that accept a prompt in their address (ChatGPT, Claude, Perplexity, T3 Chat and v0 by default), each opening a new tab with the prompt in place, plus Copy prompt for anything else. Assistants are listed by name: chatcn ships no third party logos, so pass your own marks through each provider's icon. The prompt is shown at the top of the menu, so nobody wonders what leaves the page. Replaces AI Elements' Open In Chat.

Examples

States

Ghost and subtle triggers, a short provider list, and disabled.

Props

PropTypeNotes
querystringThe prompt handed over
providersChatProvider[]{ id, name, href(query), icon? }. Defaults to chatProviders
variant, size, alignThe trigger's look and the menu's side
onOpen, onCopy
disabledboolean
labelsPartial<OpenInChatLabels>Every string, for translation

Keyboard

KeyAction
Enter or Space on the triggerOpen the menu
Arrow keys, EnterChoose an assistant

Accessibility

  • Each assistant says it opens in a new tab.
  • Copy prompt announces Copied politely.