Componenteditors1.25 KB gzipZero dependencies
Env Editor
Environment variable editor: secret masking, add/remove rows.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add env-editorOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { EnvEditor } from "@/components/ui/env-editor"; <EnvEditor />Source code
env-editor.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxenv-editor.tsx89 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface EnvVar { key: string; value: string; secret?: boolean;} export interface EnvEditorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> { vars?: EnvVar[]; onChange?: (vars: EnvVar[]) => void;} /** Environment variable editor: secret masking + add/remove keys. */export function EnvEditor({ vars: varsProp, onChange, className, ...props }: EnvEditorProps) {Props
| Prop | Type | Description |
|---|---|---|
| vars | EnvVar[] | Configures vars. |
| onChange | (vars: EnvVar[]) => void | Callback invoked on change. |