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.tsx→ components/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 Stripe-style perspective error shake for form fields, with a declarative wrapper and an imperative hook