@fiberfx/ui
v4.1.1
Published
Mercury Design System — component library on @fiberfx/hyperscript (token-driven).
Readme
@fiberfx/ui
The Mercury design system's component library on @fiberfx/hyperscript — token-driven,
presentational components styled through enum props (variant / size / tone).
Install
npm install @fiberfx/[email protected] @fiberfx/[email protected] @fiberfx/[email protected]Version 4.0.0 declares @fiberfx/[email protected] and
@fiberfx/[email protected] as peers. Install them explicitly when setting up
a consumer; no React peer is required. For a native mx app, keep its mx.mod
and mx.sum and use mx install instead of replacing its dependency workflow.
The first-page guide covers native and browser-only routes.
Use
import "@fiberfx/ui/styles.css"; // required — components are class-driven
import { Button, Card } from "@fiberfx/ui";
export function App() {
return (
<Card>
<Button variant="primary">Ship it</Button>
</Card>
);
}Styles
Load the full stylesheet once at your app root. Importing the published JavaScript entry alone does not establish that the component styles are loaded:
import "@fiberfx/ui/styles.css"; // tokens and component rules@fiberfx/ui/tokens.css is a separate tokens-only export; it does not replace
the full stylesheet when rendering UI components. A browser-only HTML page
loads the version-pinned stylesheet with a <link rel="stylesheet">, as shown
in the browser guide.
A dark-theme class on an ancestor selects the dark tokens.
License
MIT
