Registry Index

Search the catalog

Type to search items across every indexed registry, or pick a page.

ExampleReactregistry:exampleSelf-contained

Open In Chat Custom Trigger Demo

open-in-chat-custom-trigger-demo

An open in chat demo with a custom trigger.

A demo of open-in-chat

registry/8starlabs-ui/examples/open-in-chat-custom-trigger-demo.tsxcomponents/8starlabs-ui/examples/open-in-chat-custom-trigger-demo.tsx
21 lines
"use client";

import { MessageSquareText } from "lucide-react";

import OpenInChat from "@/registry/8starlabs-ui/blocks/open-in-chat";
import { Button } from "@/registry/8starlabs-ui/blocks/button";

export default function OpenInChatCustomTriggerDemo() {
  return (
    <OpenInChat
      prompt="Turn this implementation note into a concise review comment."
      trigger={
        <Button type="button" variant="secondary" className="gap-2">
          <MessageSquareText className="size-4" aria-hidden="true" />
          Ask AI
        </Button>
      }
    />
  );
}
@8starlabs-ui

More from @8starlabs-ui

A system banner component

A heatmap component

A JSON viewer component

A transport badge component

A Base UI collapsible component

A Base UI separator component

A Stripe-style perspective error shake for form fields, with a declarative wrapper and an imperative hook