Aurora AI Persona
aurora-dinglebear-ai/aurora-ai-personaFreeBlock
Aurora-native persona parity surface from AI Elements.
Install it
npx shadcn@latest add https://aurora.dinglebear.ai/r/aurora-ai-persona.jsonSource
1"use client"23/**4 * Aurora Persona — identity card (avatar, role, presence, capability chips) + compact row.5 * CD-parity standalone implementation (self-contained; the canonical shadcn file).6 */78import * as React from "react"9import { cn } from "@/lib/utils"1011export type PersonaPresence = "online" | "busy" | "away" | "offline"1213export interface PersonaProps extends React.HTMLAttributes<HTMLDivElement> {14 name: string15 /** Role / one-line description under the name. */16 role?: string17 /** @deprecated alias for `role`. */18 description?: string19 presence?: PersonaPresence20 /** Capability chips (full variant only). */21 tags?: string[]22 /** Show the Axon orange "AI" badge next to the name (full variant). */23 badge?: boolean24 variant?: "default" | "compact"25 /** Compact: render as a selected (rose-outlined) row. */26 selected?: boolean27}2829const PRESENCE: Record<PersonaPresence, string> = {30 online: "var(--aurora-success)",31 busy: "var(--aurora-accent-pink)",32 away: "var(--aurora-warn)",33 offline: "var(--aurora-neutral)",34}3536const PRESENCE_LABEL: Record<PersonaPresence, string> = {37 online: "Online",38 busy: "Busy",39 away: "Away",40 offline: "Offline",41}4243const AI_STYLE: React.CSSProperties = {44 color: "var(--axon-orange)",45 background: "var(--axon-orange-surface)",46 borderColor: "var(--axon-orange-border)",47}4849function initials(name: string): string {50 const parts = name.trim().split(/\s+/).slice(0, 2)51 return parts.map((p) => p[0]?.toUpperCase() ?? "").join("") || "?"52}5354// Styles: registry/aurora/styles/aurora-components.css (@layer aurora-components).5556const Persona = (57 { ref,58 name,59 role,60 description,61 presence,62 tags,63 badge = false,64 variant = "default",65 selected = false,66 className,67 style,68 role: elementRole,69 tabIndex,70 onClick,71 onKeyDown,72 ...props73 }: PersonaProps & { ref?: React.Ref<HTMLDivElement> }74 ) => {75 const sub = role ?? description76 const dotColor = presence ? PRESENCE[presence] : null77 const isCompact = variant === "compact"78 const dotSize = isCompact ? 10 : 1379 const interactiveProps = onClick80 ? {81 role: elementRole ?? "button",82 tabIndex: tabIndex ?? 0,83 }84 : {85 role: elementRole,86 tabIndex,87 }8889 const handleKeyDown = React.useCallback(90 (event: React.KeyboardEvent<HTMLDivElement>) => {91 onKeyDown?.(event)92// … 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 | Free | 1 dep | |
| Aurora AI Actionsaurora-ai-actions | aurora | Blocks | Free | 1 dep | |
| Aurora AI Agentaurora-ai-agent | aurora | Blocks | Free | 1 dep | |
| Aurora AI Image Gridaurora-ai-ai-image-grid | aurora | Blocks | Free | 1 dep | |
| Aurora AI Attachmentsaurora-ai-attachments | aurora | Blocks | Free | 1 dep | |
| Aurora AI Audio Playeraurora-ai-audio-player | aurora | Blocks | Free | 1 dep | |
| Aurora AI Branchaurora-ai-branch | aurora | Blocks | Free | 1 dep | |
| Aurora AI Canvasaurora-ai-canvas | aurora | Blocks | Free | 1 dep |
