@gremorie/rx-core
v0.4.0
Published
React core utilities for Gremorie - cn() helper for class name merging.
Downloads
952
Readme
@gremorie/rx-core
Core React utilities for Gremorie, an AI native design system. Provides the
cn() helper for merging Tailwind class names and ships the shared design
token stylesheet used by every other category package.
Install
npm i @gremorie/rx-coreRequires React 18 or 19 and Tailwind CSS v4 in the host project.
Styles
Import the pre compiled token stylesheet once, at your app entry. It ships the
design tokens (colors, radius, light and dark themes) as plain CSS variables,
so you do not need to wire Tailwind @theme yourself.
@import 'tailwindcss';
@import '@gremorie/rx-core/styles/globals.css';If you already pull in the meta package stylesheet, you can use that single import instead:
@import '@gremorie/react/styles.css';Usage
import { cn } from '@gremorie/rx-core';
export function Box({
active,
className,
}: {
active?: boolean;
className?: string;
}) {
return (
<div
className={cn(
'rounded-md p-4',
active && 'bg-primary text-primary-foreground',
className,
)}
/>
);
}What is included
cn(class name merge helper built on clsx and tailwind-merge)@gremorie/rx-core/styles/globals.css(design token stylesheet)
License
MIT. See LICENSE.
Full documentation lives at gremorie.com.
