@mercury-fx/core
v2.4.2
Published
Mercury foundation — the UI-free layer: class utility, shared types, headless hooks, and locale-aware date formatters. No components, no styles.
Readme
@mercury-fx/core
The UI-free foundation of the Mercury design system: a class utility (cx),
locale-aware date formatters, headless behaviour hooks, and the shared type kit.
No React components, no styles.
Most consumers get this package transitively through
@mercury-fx/ui — install it
directly only if you want the bare utilities.
Install
npm i @mercury-fx/core react # react is a peer dependencyUse
import { cx, createFormatter } from "@mercury-fx/core";
cx("btn", isActive && "btn--active"); // conditional classNames
const fmt = createFormatter("en-US"); // locale-aware Intl wrapperShips as a single ES-module bundle (dist/mercury-core.js) with type
declarations. react and @internationalized/date are kept external (a peer and
a runtime dependency, respectively).
License
MIT
