Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input Group
- Kbd
- Label
- Menu
- Menubar
- Message
- Meter
- Number Field
- OTP Field
- Pagination
- Popover
- Preview Card
- Progress
- Questionnaire
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Toolbar
- Tooltip
Shared
- Artifact
- Audio Player
- Canvas
- Chain of Thought
- Checkpoint
- Code Block
- Commit
- Connection
- Context
- Controls
- Edge
- Environment Variables
- Mic Selector
- Model Selector
- Node
- Node Toolbar
- Open in Chat
- Panel
- Plan
- Prompt Input
- Queue
- Reasoning
- Sandbox
- Schema Display
- Shimmer
- Snippet
- Sources
- Speech Input
- Stack Trace
- Suggestion
- Tool
- Transcription
- Web Preview
Hooks
Resources
Environment Variables
A list of environment variables with masked values.
Environment variables
DATABASE_URL
••••••••••••••••••••API_KEY
••••••••••••••••NODE_ENV
••••••••••import {
EnvironmentVariable,
EnvironmentVariables,
EnvironmentVariablesContent,
EnvironmentVariablesHeader,
EnvironmentVariablesTitle,
EnvironmentVariablesToggle,
} from "@/registry/default/shared/environment-variables";
export default function Particle() {
return (
<div className="w-full max-w-lg">
<EnvironmentVariables>
<EnvironmentVariablesHeader>
<EnvironmentVariablesTitle>Environment variables</EnvironmentVariablesTitle>
<EnvironmentVariablesToggle />
</EnvironmentVariablesHeader>
<EnvironmentVariablesContent>
<EnvironmentVariable name="DATABASE_URL" value="postgres://localhost:5432/app" />
<EnvironmentVariable name="API_KEY" value="sk-live-9f3a2b1c" />
<EnvironmentVariable name="NODE_ENV" value="production" />
</EnvironmentVariablesContent>
</EnvironmentVariables>
</div>
);
}
Installation
pnpm dlx shadcn@latest add @frontal-labs/environment-variables
Usage
import {
EnvironmentVariables,
EnvironmentVariablesHeader,
EnvironmentVariablesTitle,
EnvironmentVariablesToggle,
EnvironmentVariablesContent,
EnvironmentVariableGroup,
EnvironmentVariableName,
EnvironmentVariableValue,
} from "@/components/environment-variables";API Reference
| Export | Props |
|---|---|
EnvironmentVariables | <div> attributes, plus its own options |
EnvironmentVariablesHeader | <div> attributes |
EnvironmentVariablesTitle | heading attributes |
EnvironmentVariablesToggle | Switch props |
EnvironmentVariablesContent | <div> attributes |
EnvironmentVariableGroup | <div> attributes |
EnvironmentVariableName | <span> attributes |
EnvironmentVariableValue | <span> attributes |
EnvironmentVariable | <div> attributes, plus its own options |
EnvironmentVariableCopyButton | Button props, plus its own options |
EnvironmentVariableRequired | Badge props |
Open the source under Manual above for the exact prop types.
Examples
Required
API_KEYRequiredsk-live-9f3a2b1c
import {
EnvironmentVariable,
EnvironmentVariableCopyButton,
EnvironmentVariableName,
EnvironmentVariableRequired,
EnvironmentVariables,
EnvironmentVariablesContent,
EnvironmentVariablesHeader,
EnvironmentVariablesTitle,
EnvironmentVariablesToggle,
EnvironmentVariableValue,
} from "@/registry/default/shared/environment-variables";
export default function Particle() {
return (
<div className="w-full max-w-lg">
<EnvironmentVariables defaultShowValues>
<EnvironmentVariablesHeader>
<EnvironmentVariablesTitle>Required</EnvironmentVariablesTitle>
<EnvironmentVariablesToggle />
</EnvironmentVariablesHeader>
<EnvironmentVariablesContent>
<EnvironmentVariable name="API_KEY" value="sk-live-9f3a2b1c">
<EnvironmentVariableName>API_KEY</EnvironmentVariableName>
<EnvironmentVariableRequired>Required</EnvironmentVariableRequired>
<EnvironmentVariableValue>sk-live-9f3a2b1c</EnvironmentVariableValue>
<EnvironmentVariableCopyButton copyFormat="export" />
</EnvironmentVariable>
</EnvironmentVariablesContent>
</EnvironmentVariables>
</div>
);
}
On This Page