Componenteditors1.25 KB gzipZero dependencies

Env Editor

Environment variable editor: secret masking, add/remove rows.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add env-editor

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { EnvEditor } from "@/components/ui/env-editor"; <EnvEditor />

Source code

env-editor.tsx + 1 helper

Zero 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

PropTypeDescription
varsEnvVar[]Configures vars.
onChange(vars: EnvVar[]) => voidCallback invoked on change.