@marketmaker_cc/ui
v0.1.1
Published
Trading-focused React component library behind marketmaker.cc — primitives plus live trading widgets (order book, order form, portfolio, deals list).
Maintainers
Readme
@marketmaker_cc/ui
Trading-focused React component library behind marketmaker.cc — Radix-based primitives plus live trading widgets (order book, order form, portfolio, deals list, instrument search).
Install
npm i @marketmaker_cc/uiPeer deps: react and react-dom (>=18).
Setup
- Import the design tokens once (e.g.
app/layout.tsx):
import '@marketmaker_cc/ui/styles.css'- Add the Tailwind preset and include the package in your
contentso classes aren't purged:
// tailwind.config.js
module.exports = {
presets: [require('@marketmaker_cc/ui/tailwind-preset')],
content: [
'./src/**/*.{ts,tsx}',
'./node_modules/@marketmaker_cc/ui/dist/**/*.js',
],
}Usage
Named imports from the barrel (tree-shaken with ESM + sideEffects:false):
import { Button, OrderBook } from '@marketmaker_cc/ui'Per-component subpaths — use these for next/dynamic / React.lazy so only that
component's chunk is loaded:
import dynamic from 'next/dynamic'
const OrderBook = dynamic(() => import('@marketmaker_cc/ui/order-book').then((m) => m.OrderBook))License
The Unlicense — public domain.
