Aurora AI Open in Chat
aurora-dinglebear-ai/aurora-ai-open-in-chatUnverifiedBlock
Aurora-native open in chat parity surface from AI Elements.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/dinglebear-ai/aurora/main/aurora-ai-open-in-chat.jsonSource
1"use client"23/**4 * Aurora OpenInChat — hand-off-to-chat action.5 *6 * Visual layer ported 1:1 from the Claude Design source: a paper-plane lead icon7 * and three intents — `default` is the rose lit-outline "Open in chat" send action8 * (rose border + glow with rose label + icon), `outline` is the neutral bordered9 * control ("Debug in chat", primary label), and `ghost` is the borderless muted10 * affordance ("Ask about this"). Reads only `--aurora-*` tokens so it renders11 * pixel-identical in dark + `.light`.12 *13 * Architecture stays shadcn/registry: the Aurora `Button` (Radix `Slot`/`cva`)14 * carries the whole visual layer (states, focus ring, sizing), `forwardRef`,15 * `displayName`, and the full `React.ButtonHTMLAttributes` escape hatch are16 * preserved. CD's `variant`/`size` prop vocabulary is kept verbatim and mapped17 * onto the Button underneath.18 */1920import * as React from "react"21import { Send } from "lucide-react"22import { Button, type ButtonSize } from "@/registry/aurora/ui/button"2324export interface OpenInChatProps25 extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color"> {26 /**27 * Intent. `default` is the rose send action, `outline` is the neutral bordered28 * control, `ghost` is the borderless muted affordance.29 */30 variant?: "default" | "outline" | "ghost"31 /** Control size — matches the Aurora Button scale. */32 size?: ButtonSize33}3435// Map CD's OpenInChat variant vocabulary onto Aurora Button variants.36const VARIANT_MAP = {37 default: "rose",38 outline: "neutral",39 ghost: "ghost",40} as const4142const OpenInChat = ({ ref, variant = "default", size = "default", children = "Open in Chat", style, ...props }: OpenInChatProps & { ref?: React.Ref<HTMLButtonElement> }) => {43 // The rose intent paints its label + icon in the pink accent (CD spec); the44 // neutral/ghost intents inherit their Button variant's text color.45 const rose = variant === "default"46 return (47 <Button48 ref={ref}49 type="button"50 variant={VARIANT_MAP[variant]}51 size={size}52 style={rose ? { color: "var(--aurora-accent-pink)", ...style } : style}53 iconLeft={<Send size={14} strokeWidth={1.75} aria-hidden data-icon="inline-start" />}54 {...props}55 >56 {children}57 </Button>58 )59 }60OpenInChat.displayName = "OpenInChat"6162export { OpenInChat }63export default OpenInChat
What it pulls in
npm packages
Other registry items
Files it writes
More from aurora
All 176 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Aurora AI Actionaurora-ai-action | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Actionsaurora-ai-actions | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Agentaurora-ai-agent | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Image Gridaurora-ai-ai-image-grid | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Attachmentsaurora-ai-attachments | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Audio Playeraurora-ai-audio-player | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Branchaurora-ai-branch | aurora | Blocks | Unverified | 1 dep | |
| Aurora AI Canvasaurora-ai-canvas | aurora | Blocks | Unverified | 1 dep |
