@yugnex/core
v0.2.0
Published
NexUI runtime: theme engine, styling engine, animation system and shared accessibility hooks. Built from scratch, zero styling dependencies.
Maintainers
Readme
@yugnex/core
The NexUI runtime: theme engine, styling engine, animation system, and shared accessibility hooks. Built from scratch — no Tailwind, no Emotion/styled-components, no Radix/Headless UI dependency.
This is the only NexUI package installed as a real dependency. UI components themselves (Button, Modal, Select, and 48 others) are not published to npm — they're copied directly into your project source via the NexUI CLI, so you own and can freely edit the code you ship.
Install
npm install @yugnex/coreUsage
// app/layout.tsx
import { StyleRegistry, ThemeProvider, NoFoucScript } from "@yugnex/core/client";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<NoFoucScript />
</head>
<body>
<StyleRegistry>
<ThemeProvider>{children}</ThemeProvider>
</StyleRegistry>
</body>
</html>
);
}import { css, themeVars as theme } from "@yugnex/core";
const cardClass = css({
padding: theme.space[6],
borderRadius: theme.radius.lg,
backgroundColor: theme.color.card,
color: theme.color.cardForeground,
});css()/keyframes()— object-style CSS-in-JS, compiled once per unique shape and cached.createTheme()/themePresets— token overrides and six built-in presets (nex, midnight, solar, forest, rose, mono).createVariants()— a CVA-shaped variant composer.@yugnex/core/client—ThemeProvider,StyleRegistry,usePresence, and the shared a11y hooks (useFocusTrap,useRovingTabIndex,usePortal,useClickOutside,useEscapeKey,useControllableState).
Repository
Source, the full component registry, and docs: github.com/amitsharmatb0001/nex-ui
License
MIT
