Reveal and copy selected values
MODEL_NAMERequiredModel selected by this workspace- ••••••••
EXAMPLE_TOKENRequiredExample value for reveal and copy- ••••••••
Masks environment values by default, with deliberate reveal, value copy and quoted shell exports.
MODEL_NAMERequiredModel selected by this workspaceEXAMPLE_TOKENRequiredExample value for reveal and copyMODEL_NAMERequiredModel selected by this workspaceEXAMPLE_TOKENRequiredExample value for reveal and copynpm install @noorddev/vlak-react
Load the stylesheet once at your app root, then import the components you use.
import "@noorddev/vlak-react/css";
import { EnvironmentVariables } from "@noorddev/vlak-react";Per-component imports are available at @noorddev/vlak-react/components/environment-variables.
npx @noorddev/vlak-cli add environment-variables
Adds the component and its dependencies to components/vlak/. Follow the StyleX setup to compile the source in your application.
npx shadcn add https://vlak.dev/r/environment-variables.json
Installs the same source through the shadcn CLI.
import { EnvironmentVariables } from "@noorddev/vlak-react";
<EnvironmentVariables variables={[{ name: "MODEL_NAME", value: "workspace-model", required: true }, { name: "EXAMPLE_TOKEN", value: "example-only" }]} />See the integration example to compose these components with your application's model and data.
Masked values with deliberate reveal and exact-value/export copy actions.
| Prop | Type | Default | Description |
|---|---|---|---|
variablesrequired | EnvironmentVariable[] | ||
title | ReactNode | "Environment variables" | |
showValues | boolean | ||
defaultShowValues | boolean | false | |
onShowValuesChange | (show: boolean) => void | ||
onCopy | (value: string) => void | Promise<void> |
Also accepts Omit<HTMLAttributes<HTMLElement>, "onCopy" | "title">.
The ref reaches HTMLElement.
POSIX shell-safe assignments. Invalid names are rejected rather than emitted as executable shell text.
| Keys | Does |
|---|---|
| Tab | Tab reaches show-all, per-row reveal and copy controls. |
| Enter, Space | Enter or Space activates a focused control; the show-all button exposes its pressed state. |
The same styles are available as CSS. Native HTML provides the static presentation; React or application code supplies state updates and actions.
npm install @noorddev/vlak
import "@noorddev/vlak/css";
<section class="rs-environment-variables" aria-labelledby="environment-title"><header class="rs-environment-variables-header"><span class="rs-environment-variables-title" id="environment-title">Environment variables</span></header><dl class="rs-environment-variables-list"><div class="rs-environment-variables-row"><dt class="rs-environment-variables-name"><code>MODEL_NAME</code></dt><dd class="rs-environment-variables-value"><span role="img" aria-label="Value hidden">••••••••</span></dd></div></dl></section>