Aurora AI Environment Variables
aurora-dinglebear-ai/aurora-ai-environment-variablesFreeBlock
Aurora-native environment variables parity surface from AI Elements.
Install it
npx shadcn@latest add https://aurora.dinglebear.ai/r/aurora-ai-environment-variables.jsonSource
1"use client"23import * as React from "react"4import { Check, Copy, Eye, EyeOff, KeyRound } from "lucide-react"5import { cn } from "@/lib/utils"6import { Badge } from "@/registry/aurora/ui/badge"7import { Button } from "@/registry/aurora/ui/button"8import { Separator } from "@/registry/aurora/ui/separator"9import { useClipboard } from "@/registry/aurora/lib/use-clipboard"1011export interface EnvironmentVariable {12 key: string13 value?: string14 secret?: boolean15 required?: boolean16}1718export interface EnvironmentVariablesProps extends React.HTMLAttributes<HTMLDivElement> {19 variables: EnvironmentVariable[]20}2122function panelStyle(style?: React.CSSProperties): React.CSSProperties {23 return {24 background: "var(--aurora-surface-raised)",25 border: "1px solid var(--aurora-border-strong)",26 borderRadius: "var(--aurora-radius-1)",27 boxShadow: "var(--aurora-shadow-medium), var(--aurora-highlight-medium)",28 ...style,29 }30}3132function maskValue(value: string): string {33 // Reveal a short prefix, then mask the remainder with dots — matches CD.34 const visible = value.slice(0, 6)35 return `${visible}${value.length > 6 ? "••••" : ""}`36}3738function previewValue(value: string | undefined, secret: boolean, revealed: boolean): string {39 if (!value) return "Unset"40 if (secret && !revealed) return maskValue(value)41 return value.length > 18 ? `${value.slice(0, 18)}…` : value42}4344function RowCopyButton({ value, label }: { value: string; label: string }) {45 const { copied, error, copy } = useClipboard(1200)46 const handleCopy = React.useCallback(() => void copy(value), [copy, value])4748 return (49 <Button50 type="button"51 variant="ghost"52 size="icon"53 onClick={handleCopy}54 aria-label={copied ? `Copied ${label}` : error ? `Unable to copy ${label}` : `Copy ${label}`}55 style={{ height: 26, width: 26, borderRadius: 6 }}56 >57 {copied ? (58 <Check className="size-3.5" aria-hidden style={{ color: "var(--aurora-success)" }} />59 ) : (60 <Copy className="size-3.5" aria-hidden />61 )}62 </Button>63 )64}6566const EnvironmentVariables = ({ ref, className, variables, style, ...props }: EnvironmentVariablesProps & { ref?: React.Ref<HTMLDivElement> }) => {67 const [revealed, setRevealed] = React.useState(false)68 const hasSecret = variables.some((item) => item.secret)6970 return (71 <div72 ref={ref}73 className={cn("grid gap-3 p-4", className)}74 style={panelStyle(style)}75// … 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 |
