Aurora AI Message
aurora-dinglebear-ai/aurora-ai-messageUnverifiedBlock
Aurora-native message parity surface from AI Elements.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/dinglebear-ai/aurora/main/aurora-ai-message.jsonSource
1"use client"23import * as React from "react"4import { Avatar as AuroraAvatar } from "@/registry/aurora/ui/avatar"5import { Button } from "@/registry/aurora/ui/button"67// ─── Types ──────────────────────────────────────────────────────────────────89export interface MessageProps extends React.HTMLAttributes<HTMLElement> {10 role?: "assistant" | "user" | "system"11 /** Timestamp shown in the hover-revealed meta row */12 time?: React.ReactNode13 /** Action buttons shown in the hover-revealed meta row */14 actions?: React.ReactNode15}1617export interface MessageAvatarProps extends React.HTMLAttributes<HTMLSpanElement> {18 label: string19 tone?: "axon" | "cyan" | "rose" | "muted"20 status?: "online" | "away" | "busy" | "offline"21}2223export interface MessageContentProps extends React.HTMLAttributes<HTMLDivElement> {24 tone?: MessageProps["role"]25 /** Append a blinking caret to signal an in-progress stream */26 streaming?: boolean27}2829// Styles: registry/aurora/styles/aurora-components.css (@layer aurora-components).3031// ─── Message ─────────────────────────────────────────────────────────────────32// Turn row: avatar + bubble, with a timestamp/actions meta row revealed on hover.3334const Message = ({ ref, className, role = "assistant", time, actions, style, children, ...props }: MessageProps & { ref?: React.Ref<HTMLElement> }) => {35 const isUser = role === "user"36 const hasMeta = time != null || actions != null3738 return (39 <article40 ref={ref}41 className={["group/aurora-msg flex flex-col", className].filter(Boolean).join(" ")}42 data-role={role}43 style={{44 color: "var(--aurora-text-primary)",45 alignItems: isUser ? "flex-end" : "stretch",46 ...style,47 }}48 {...props}49 >50 <div51 className="flex gap-[10px]"52 style={{ justifyContent: isUser ? "flex-end" : "flex-start", alignItems: "flex-start" }}53 >54 {children}55 </div>56 {hasMeta && (57 <div58 className="flex items-center gap-[6px] opacity-0 transition-opacity duration-150 ease-out group-hover/aurora-msg:opacity-100"59 style={{60 marginTop: 5,61// … truncated
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 |
