
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@consensys/ui-config
Advanced tools
> 🚧 **Note**: This package is under active development. While we're working hard to make it production-ready, please be aware that APIs and features may change. We welcome your feedback and contributions as we continue to improve!
🚧 Note: This package is under active development. While we're working hard to make it production-ready, please be aware that APIs and features may change. We welcome your feedback and contributions as we continue to improve!
🔧 Unified configuration layer for the CUI ecosystem
Build consistent, type-safe applications across web and React Native with a single configuration layer that handles framework integration, theming, and build tooling.
// One configuration. Any platform. Native everywhere.
import { vitePlugin } from '@consensys/ui-config/vite';
import { nativewindPreset } from '@consensys/ui-config/nativewind';
🔄 Framework Integration - Seamless setup for Vite, Expo, and React Native with optimized defaults
🎨 Theme Integration - Unified theming system that works across all platforms
🔧 Build Tooling - Comprehensive build configurations for web and native development
📱 Cross-Platform - Consistent configuration patterns for web and React Native
🛠️ Type Safety - Full TypeScript support with comprehensive type definitions
🏗️ Workspace Support - Optimized for monorepo setups with proper module resolution
pnpm add @consensys/ui-config
The configuration system follows a three-step process to make your theme available throughout your application:
theme.config.tsEach platform has its own way of accessing global variables:
For detailed theme configuration options, see the @consensys/ui-theme documentation.
// theme.config.ts
import { UserConfig } from '@consensys/ui-theme'
export default {
themes: {
default: {
colors: {
neutral: 'gray',
primary: 'blue',
secondary: 'violet',
error: 'red',
warning: 'amber',
success: 'green',
},
},
},
} satisfies UserConfig;
The Vite plugin provides optimized defaults for web development:
// vite.config.ts
import { defineConfig } from 'vite'
import cui from '@consensys/ui-config/vite';
import themeConfig from "./theme.config";
export default defineConfig(({ command }) => ({
plugins: [
cui(command, themeConfig),
],
}));
The plugin automatically:
import.meta.env.CUIYou can access the theme configuration in your application using:
const theme = import.meta.env.CUI;
See vite.plugin.ts for implementation details. See vite.config.ts for usage example.
The NativeWind preset combines Tailwind and React Native styling:
// tailwind.config.js
import nativewindPreset from "@consensys/ui-config/nativewind";
import themeConfig from "./theme.config";
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
'./node_modules/@consensys/ui/**/*.{js,jsx,ts,tsx}',
],
presets: [nativewindPreset(themeConfig)]
}
See nativewind.preset.ts for implementation details. See tailwind.config.js for usage example.
Expo-specific configurations for React Native development:
// app.config.js
import withCui from '@consensys/ui-config/expo';
import themeConfig from './theme.config';
module.exports = ({ config }) => {
return withCui({ config, themeConfig });
};
The Expo configuration:
global.CUI for runtime accessYou can access the theme configuration in your application using:
const theme = global.CUI;
See expo.preset.ts for implementation details. See app.config.js for usage example.
// babel.config.js
module.exports = function (api) {
api.cache(true);
return {
presets: ['@consensys/ui-config/expo/babel'],
};
};
The babel preset automatically configures:
See babel.preset.ts for implementation details. See babel.config.js for usage example.
Metro bundler configuration for React Native:
// metro.config.js
const { getDefaultConfig } = require('expo/metro-config');
const { withCuiWorkspace } = require('@consensys/ui-config/metro');
const config = getDefaultConfig(__dirname);
module.exports = withCuiWorkspace(config);
The Metro configuration:
See metro.config.ts for implementation details. See metro.config.js for usage example.
For complete examples, see:
@consensys/ui-config provides a unified configuration layer that ties together the entire CUI ecosystem:
Single Source of Truth
theme.config.ts file configures everythingUserConfig typeFramework Integration
Workspace Optimization
# Install dependencies
pnpm i
# Watch and build
pnpm dev
# Production build
pnpm build
We welcome contributions!
MIT
FAQs
> 🚧 **Note**: This package is under active development. While we're working hard to make it production-ready, please be aware that APIs and features may change. We welcome your feedback and contributions as we continue to improve!
We found that @consensys/ui-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 17 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.