Arc
ComponentsBlocksDocsPricingTry the demo
Get Pro
Introduction
Installation
Theming
Motion
AI and MCP
Changelog
Metrics dashboardPro
KPI drilldownPro
Metric explorerPro
Revenue explorerPro
MRR waterfallPro
Cohort retentionPro
Usage forecastPro
Journey flowPro
Uptime statusPro
Pivot builderNewPro
Choropleth explorerPro
Connected scatterPro
Horizon chartPro
Account healthPro
Market terminalPro
Budget variancePro
Small multiplesPro
Line replayPro
AI chatPro
AI composerPro
AI answerPro
Model pickerPro
Model arenaPro
Prompt studioPro
Document extractionPro
Agent memoryPro
AI side panelPro
AI inline editPro
Research runPro
AI insight cardPro
Catch upPro
AI feature launchPro
AI search barPro
AI setup wizardPro
Call insightsPro
Lead scoringPro
Agent runPro
Agent tasksPro
Agent approvalsPro
Agent routinesPro
Agent orchestratorPro
MCP serversPro
Knowledge basePro
Eval suitePro
Agent builderPro
Agent galleryPro
SidebarPro4
Page header
Command palette
Notification center
Selection toolbarPro
Empty states
Search resultsPro
Login and sign up5, free and Pro variants
Onboarding illustrationPro
OTP input
Multi-step formPro
Two-factor setupPro
Magic linkPro
Settings pagePro
Settings commandPro
Security settingsPro
Billing overviewPro
Usage billingPro
Cancel flowPro
Onboarding surveyPro
Spend alertPro
Team membersPro
Invite peoplePro
Team directoryPro
Roles and permissionsPro
Profile pagePro
API keysPro
WebhooksPro
IntegrationsPro
Environment variablesPro
Domain verifyPro
Webhook testerPro
Plan comparison
Pricing calculatorPro
Usage pricingPro
Cart drawerPro
Checkout summaryPro
Live checkoutPro
Seat managerPro
Credit top-upPro
Invoice studioPro
Wallet cardPro
Delivery trackerPro
Product listingPro
Product detailPro
Seat mapPro
Activity feedPro
Inbox triagePro
Support conversationPro
Support widgetPro
Help centerPro
Feature votingPro
File upload
Media playerPro
Week calendarPro
Availability pickerPro
Project boardPro
Gantt timelineNewPro
Release readinessPro
Kanban boardPro
Feedback boardPro
Smart schedulerPro
Task breakdownPro
Goal trackerPro
Hero section
Hero signupPro
Scroll storyPro
Spotlight gridPro
Feature bentoPro
Comparison table
Logo marquee
Studio perspectivesPro
Stats band
Changelog feed
FAQ section
Contact section
Team showcasePro
Blog grid
Site header
Site footer
CTA section
Newsletter signup
Activity terrainPro
Revenue globePro
Customer galaxyPro
Semantic zoomPro
Layout morphPro
Exploded viewPro
What’s new4 new
BlocksEnvironment variables

Environment variables

Pro

An environment variables and secrets manager with masked values, per-environment scope toggles, .env paste import with duplicate and invalid key warnings, write-only sensitive values, an environment diff by fingerprint, and a redeploy banner.

Live block · sample data

When to use

  • A settings screen where developers manage configuration and secrets across development, preview, and production.
  • Onboarding a project by pasting an existing .env file and scoping it to environments in one step.
  • Auditing drift between environments before a release, such as a key set in Preview but missing in Production.

When not to use

  • Use api-keys for creating, scoping, and revoking access tokens that your product issues to its users.
  • Use a plain form for a handful of fixed settings that are not per environment.

Installation

Pro source and install commands unlock with a Pro plan.

Usage

Render <EnvVariables /> for the demo, or pass variables, project and sampleDotenv with onChange to persist rows and onRedeploy (which can return a promise) to run a real deploy.

example.tsx
1import { EnvVariables } from "@/components/arc/blocks/env-variables/env-variables";2 3export function ProjectEnvironment({ project, variables }) {4  return (5    <EnvVariables6      project={project.slug}7      variables={variables}8      sampleDotenv=""9      onChange={rows => saveVariables(project.id, rows)}10      onRedeploy={environments => triggerRedeploy(project.id, environments)}11    />12  );13}
Built fromButtonCheckboxCopy buttonInputSearch fieldSegmented controlSelectSwitchTextarea

API reference

EnvVariables

An environment variables and secrets manager. Each row is one value and the environments it applies to, drawn as a matrix of Development, Preview, and Production toggles, so a key can hold a different value per environment. Values stay masked and are not in the DOM until revealed; sensitive values are write-only. Add one variable or paste a whole .env file, compare two environments by fingerprint, and redeploy from a banner that appears after changes.

PropTypeDefaultDescription
variablesEnvVariable[]VARIABLESRows in any order: { id, key, value, environments, sensitive, updated, updatedBy }. A key can appear on several rows as long as each environment is covered at most once. The block sorts rows by key.
projectstring"northwind-storefront"Project name shown under the heading.
sampleDotenvstringSAMPLE_DOTENVText the paste area starts with when Import .env opens. Pass an empty string for a blank paste area.
titlestring"Environment variables"Heading text.
onChange(variables: EnvVariable[]) => void–Called with every row after each add, import, edit, removal, scope toggle, or copy between environments.
onRedeploy(environments: EnvName[]) => void | Promise<void>–Called when Redeploy is pressed with the environments that changed. Return a promise to keep the banner pending until it settles; a rejection shows the failure state and keeps the changes queued. Without it, the deploy is simulated.
classNamestring–Class on the root section.

Keyboard interactions

Tab
Moves through the header actions, search, view switch, and each row's reveal, copy, environment toggles, and edit button.
EnterorSpace
Reveals or hides a value, turns an environment on or off for a row, opens the inline editor, or presses a button.
Escape
Closes the inline editor or the add panel and returns focus to the button that opened it.
Arrow keys
Move between options in the view switch, the add mode switch, and the compare environment selects.
Enter in a form
Saves the edited value, saves a new variable, or imports the parsed .env lines.

Accessibility

  • Masked values render as bullets hidden from assistive technology plus a visually hidden "Hidden value" or "Sensitive value, write-only" label; the real value is only rendered after Reveal.
  • Reveal and environment toggles are buttons with aria-pressed and names that include the key, such as "Production for DATABASE_URL".
  • Each row's toggles sit in a labelled group; the wide matrix column heads are decorative and every toggle carries its own name.
  • Inline errors (invalid key, key already set in an environment, empty value) are tied to their fields; scope conflicts appear as an alert under the row.
  • A polite live region announces every change, import, removal, and redeploy result, and the .env parse summary updates live as you type.
  • Pointer focus draws no ring; keyboard focus shows Arc's shared focus ring. Keyboard position shows as a fill on toggles and icon buttons, matching hover.

Motion

  • The redeploy banner, add panel, inline editor, and conflict notes open with height and opacity on the smooth spring and close with a quicker exit ease.
  • Environment toggles fill with a snappy scale and draw their check with pathLength, both without overshoot.
  • Revealing a value crossfades the mask and the value with a short rise in a fixed height slot, so the row never jumps.
  • Added and removed rows grow and collapse their height so the list closes its gap; saved or imported rows glow once in the accent and fade.
  • The Variables and Compare views crossfade with a small rise. Reduced motion removes all travel and lands every change at once.

Responsive behavior

  • From a 760px container, rows become a matrix: key, value, one toggle column per environment with a count of values set, and an edit action.
  • Below that, each row stacks the key and edit action, then the value, then three labelled environment pills in an even grid.
  • Below 560px header actions, search, form actions, and the redeploy button go full width; the .env preview drops the masked value column.
  • Toggles, icon buttons, and the swap control grow to 44px targets on touch screens. The block is a container query, so it adapts to the space it is placed in.

Performance

  • The .env text is parsed in a memo keyed on the text, rows, and chosen environments; there is no per-frame work.
  • Only revealed rows render their value and copy button, and only the open row renders an editor.
  • Timers for notes, the saved glow, and the redeploy confirmation are cleared on change and unmount.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Choose it for a project settings page in a hosting, deployment, or backend platform. Wire onChange to your store and onRedeploy to your deploy API.
  • Search matches key names only, never values. Compare shows a six character fingerprint of each value, so two environments can be checked without exposing either.
  • Sensitive rows are write-only: the editor starts empty and saving replaces the value; the flag cannot be turned off without removing and re-adding the variable.
  • The .env parser handles comments, blank lines, export prefixes, quotes, and inline comments. Later duplicates win the key and earlier ones are skipped; keys that start with a number or contain other characters are rejected.
/components/blocks/env-variables/markdown

The full library index for assistants is at /llms.txt.

Related

API keysProBlockAPI key management where Create key unfolds into its form and each secret is shown once.Security settingsProBlockAn account security page with guided two-factor setup, password change and active sessions.
PreviousSearch resultsNextMarket terminal
Arc · 134 block pagesllms.txt

On this page

  • Preview
  • When to use
  • When not to use
  • Installation
  • Usage
  • API reference
  • Keyboard
  • Accessibility
  • Motion
  • Responsive behavior
  • Performance
  • Notes for AI
  • Related
View as Markdown

Environment variables

northwind-storefront10 keys across 3 environments

KeyValueDevelopment6 setPreview8 setProduction10 set
  • DATABASE_URLUpdated Aug 12 by Emma Collins
    ••••••••••••••••Hidden value
  • DATABASE_URLUpdated Aug 12 by Emma Collins
    ••••••••••••••••Sensitive value, write-onlySensitive
  • FEATURE_NEW_CHECKOUTUpdated Sep 21 by Emma Collins
    ••••••••••••••••Hidden value
  • FEATURE_NEW_CHECKOUTUpdated Sep 21 by Emma Collins
    ••••••••••••••••Hidden value
  • LOG_LEVELUpdated Apr 8 by Sofia Ramirez
    ••••••••••••••••Hidden value
  • LOG_LEVELUpdated Apr 8 by Sofia Ramirez
    ••••••••••••••••Hidden value
  • NEXT_PUBLIC_SITE_URLUpdated Jun 3 by Marcus Johnson
    ••••••••••••••••Hidden value
  • NEXT_PUBLIC_SITE_URLUpdated Jun 3 by Marcus Johnson
    ••••••••••••••••Hidden value
  • NEXT_PUBLIC_SITE_URLUpdated Jun 3 by Marcus Johnson
    ••••••••••••••••Hidden value
  • REDIS_URLUpdated Sep 18 by Sofia Ramirez
    ••••••••••••••••Hidden value
  • REDIS_URLUpdated Sep 18 by Sofia Ramirez
    ••••••••••••••••Sensitive value, write-onlySensitive
  • RESEND_API_KEYUpdated Jul 19 by Jasmine Brooks
    ••••••••••••••••Hidden value
  • SEARCH_ADMIN_KEYUpdated Jul 30 by Jasmine Brooks
    ••••••••••••••••Sensitive value, write-onlySensitive
  • SENTRY_DSNUpdated May 27 by Marcus Johnson
    ••••••••••••••••Hidden value
  • STRIPE_SECRET_KEYUpdated Sep 2 by Ava Mitchell
    ••••••••••••••••Hidden value
  • STRIPE_SECRET_KEYUpdated Sep 2 by Ava Mitchell
    ••••••••••••••••Sensitive value, write-onlySensitive
  • STRIPE_WEBHOOK_SECRETUpdated Sep 2 by Ava Mitchell
    ••••••••••••••••Sensitive value, write-onlySensitive