Aurora AI Node
aurora-dinglebear-ai/aurora-ai-nodeUnverifiedBlock
Aurora-native flow node card with status accents and handles.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/dinglebear-ai/aurora/main/aurora-ai-node.jsonSource
1"use client"23import * as React from "react"4import { cn } from "@/lib/utils"56/**7 * Node — a flow-graph node card with a status accent, an interactive selected8 * state, and left/right connection handles.9 *10 * The status accent is a rounded bar inset on the left edge plus a matching11 * status dot before the title. Selecting the node draws a rose ring around the12 * whole card. Connection handles are the hollow cyan rings that straddle the13 * left and right vertical-center edges.14 */1516export type NodeStatus = "idle" | "running" | "done" | "error"1718export interface NodeProps extends React.HTMLAttributes<HTMLDivElement> {19 title: string20 description?: string21 /** Drives the left accent bar + status dot color. */22 status?: NodeStatus23 /** Draws the rose selection ring + reports aria-pressed when interactive. */24 selected?: boolean25 /** Show the left/right connection handles. Defaults to true. */26 handles?: boolean27}2829const statusColor: Record<NodeStatus, string> = {30 idle: "var(--aurora-text-muted)",31 running: "var(--aurora-accent-primary)",32 done: "var(--aurora-success)",33 error: "var(--aurora-error)",34}3536const Node = (37 { ref,38 title,39 description,40 status = "idle",41 selected = false,42 handles = true,43 className,44 style,45 onClick,46 ...props47 }: NodeProps & { ref?: React.Ref<HTMLDivElement> }48 ) => {49 const interactive = typeof onClick === "function"50 const accent = statusColor[status]5152 return (53 <div54 ref={ref}55 role={interactive ? "button" : undefined}56 tabIndex={interactive ? 0 : undefined}57 aria-pressed={interactive ? selected : undefined}58 onClick={onClick}59 onKeyDown={60 interactive61 ? (event) => {62 if (event.key === "Enter" || event.key === " ") {63 event.preventDefault()64 ;(event.currentTarget as HTMLElement).click()65 }66 }67 : undefined68 }69 className={cn("aurora-node", interactive && "aurora-node--interactive", className)}70 style={71 {72 "--node-accent": accent,73 position: "relative",74 boxSizing: "border-box",75 width: "13.5rem",76 paddingTop: "13px",77 paddingBottom: "13px",78 paddingLeft: "22px",79 paddingRight: "16px",80 background: "var(--aurora-surface-raised)",81 border: selected82// … 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 |
