Aurora AI Connection
aurora-dinglebear-ai/aurora-ai-connectionUnverifiedBlock
Aurora-native node connection with status-tinted directional edges.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/dinglebear-ai/aurora/main/aurora-ai-connection.jsonSource
1"use client"23/**4 * Aurora Connection — a flow edge between two nodes (e.g. a data pipeline hop).5 *6 * Two rounded node pills, each with a status-tinted dot + label, joined by a7 * directional edge (line + arrowhead) carrying an optional label. The edge8 * reflects `status`:9 * - `ok` — teal, solid10 * - `active` — cyan, dashed + animated (flowing)11 * - `error` — rose, solid12 * - `pending` — slate, dashed (static)13 * `bidirectional` adds a reverse arrowhead at the source end.14 *15 * This file deliberately re-implements `Connection` (rather than re-exporting the16 * legacy `core` version) so it can carry the `label` / `status` /17 * `bidirectional` API while keeping every shadcn/Aurora guarantee:18 * `forwardRef`, `displayName`, `React.memo`, and full19 * `React.HTMLAttributes` spread. Token-only colors (`--aurora-*`).20 */2122import * as React from "react"2324export type ConnectionStatus = "ok" | "active" | "error" | "pending"2526export interface ConnectionProps extends React.HTMLAttributes<HTMLDivElement> {27 /** Source node label. */28 from: string29 /** Target node label. */30 to: string31 /** Optional caption rendered above the edge (e.g. latency, status code). */32 label?: string33 /** Drives the edge + dot tint and the dash/flow treatment. */34 status?: ConnectionStatus35 /** Adds a reverse arrowhead at the source end. */36 bidirectional?: boolean37}3839// Styles: registry/aurora/styles/aurora-components.css (@layer aurora-components).4041const Connection = (42 { ref,43 from,44 to,45 label,46 status = "ok",47 bidirectional = false,48 className,49 ...props50 }: ConnectionProps & { ref?: React.Ref<HTMLDivElement> }51 ) => {52 const dashed = status === "active" || status === "pending"53 const flowing = status === "active"54 const cls = ["aurora-connection", className].filter(Boolean).join(" ")55 const ariaLabel = bidirectional56 ? `${from} connected bidirectionally with ${to}${label ? `, ${label}` : ""}`57 : `${from} connects to ${to}${label ? `, ${label}` : ""}`5859 return (60 <div61 ref={ref}62 className={cls}63 data-status={status}64 data-dashed={dashed || undefined}65 data-flowing={flowing || undefined}66 role="img"67 aria-label={ariaLabel}68 {...props}69 >70 <span className="aurora-connection__node">71 <span className="aurora-connection__dot" aria-hidden />72// … 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 |
