
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
zenui-theme
Advanced tools
A cross-platform, utility-first theming solution for React Native and React Native Web, built for the ZenUI design system.
A cross-platform, mobile-first, utility-focused theming package for React Native and React Native Web. Provides design tokens, a lightweight ThemeProvider, small set of theme-aware prebuilt components, and a Tailwind-like utility parser for rapid styling on mobile.
Key goals:
Design tokens (exported): colors, spacing, fontSize, fontWeight, lineHeight, borderRadius, shadows, zIndex.
Theming primitives:
ThemeProvider — provides light/dark color mode and theme object.useTheme, useColorMode — hooks for accessing theme and toggling color mode.cn(...) — className joinercreateStyleObject(className) — converts a small subset of Tailwind-like classes into React Native style objects. Supports:
p-md).bg-primary500 / text-primary700 for convenience.w-md)Note: This package implements a practical subset to get started quickly. For production-grade, full Tailwind support consider integrating NativeWind or similar tools; this package focuses on a consistent token system, mobile defaults, and small accessible components.
Install the package and ensure peer deps are present:
npm install zenui-theme
# or
yarn add zenui-theme
Peer dependencies: react, react-native (or react-native-web when used on web).
Wrap your app with ThemeProvider:
import React from 'react'
import { ThemeProvider } from 'zenui-theme'
export default function App() {
return (
<ThemeProvider initialColorMode="light">
{/* your app */}
</ThemeProvider>
)
}
Using components with utility classes and tokens:
import React from 'react'
import { Box, Text, Button, Input, Stack, Avatar, Badge } from 'zenui-theme'
export function Example() {
return (
// using named spacing and flattened color class
<Box className="p-md bg-primary50">
<Stack spacing={12}>
<Avatar size={48} />
<Text className="text-lg text-primary700">Hello</Text>
<Input placeholder="Enter name" />
<Button>Save</Button>
<Badge>New</Badge>
</Stack>
</Box>
)
}
The className prop accepts the small Tailwind-like subset documented above and converts it to React Native styles using the internal token set.
This package provides a curated set of components that are:
ThemeProvider)className (utility classes) and direct style propCategory-wise mapping:
TextInput multiline; Checkbox/Radio/Switch/Slider not included in this minimal set — consider integrating community packages or adding later.direction), Center achieved via className utilitiesText component and fontSize tokensIf you need the full comprehensive set (Checkbox, Slider, Toast, Actionsheet, Tabs), I can add them next — they require additional accessibility and platform-specific behavior.
You can import tokens directly when building custom components or styles:
import { colors, spacing, fontSize } from 'zenui-theme'
// dot-access flattened tokens and named spacing
console.log(colors.primary500, spacing.md, fontSize.lg)
Switching color mode at runtime:
import { useColorMode } from 'zenui-theme'
function Toggle() {
const { colorMode, toggleColorMode } = useColorMode()
return <Button onPress={toggleColorMode}>Switch to {colorMode === 'light' ? 'dark' : 'light'}</Button>
}
packages/theme/src/tokens.ts and are mirrored in lib/ builds.packages/theme/src/utils.ts — the createStyleObject parser is intentionally small and easy to extend.packages/theme/src/components/ and aim to be minimal, mobile-first, and easy to extend.Suggested next steps to reach full feature parity with the checklist in the project request:
Apache License 2.0 — see LICENSE in the repository root.
FAQs
Design tokens, Tailwind config, and theming utilities for ZenUI
We found that zenui-theme demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.