# Open In Chat Example

> Example implementation of open in-chat.

A shadcn/ui block from the [@ai-elements](https://ai-sdk.dev/elements) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/ai-elements/example-open-in-chat).

- Page, with a live preview: https://shadcn.exchange/r/ai-elements/example-open-in-chat
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/ai-elements/example-open-in-chat-light-4d6676ea4501790b.png
- Registry item: https://ai-sdk.dev/elements/api/registry/example-open-in-chat.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ai-sdk.dev/elements/api/registry/example-open-in-chat.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `https://elements.ai-sdk.dev/open-in-chat.json`

## Files

### `registry/default/examples/open-in-chat.tsx`

```tsx
"use client";

import {
  OpenIn,
  OpenInChatGPT,
  OpenInClaude,
  OpenInContent,
  OpenInCursor,
  OpenInScira,
  OpenInT3,
  OpenInTrigger,
  OpenInv0,
} from "@/components/ai-elements/open-in-chat";

const Example = () => {
  const sampleQuery = "How can I implement authentication in Next.js?";

  return (
    <OpenIn>
      <OpenInTrigger />
      <OpenInContent>
        <OpenInChatGPT query={sampleQuery} />
        <OpenInClaude query={sampleQuery} />
        <OpenInCursor query={sampleQuery} />
        <OpenInT3 query={sampleQuery} />
        <OpenInScira query={sampleQuery} />
        <OpenInv0 query={sampleQuery} />
      </OpenInContent>
    </OpenIn>
  );
};

export default Example;
```
