Installation
react-klinecharts-ui ships as ESM + CJS with TypeScript types. Install it
alongside its peer dependencies react, react-dom and klinecharts.
npm install react-klinecharts-ui klinechartspnpm add react-klinecharts-ui klinechartsyarn add react-klinecharts-ui klinechartsPeer dependencies
Section titled “Peer dependencies”| Package | Required | Version |
|---|---|---|
react | yes | >= 17.0.0 |
react-dom | yes | >= 17.0.0 |
klinecharts | yes | >= 10.0.0 |
react-klinecharts | optional | >= 1.0.0 |
react-klinecharts is only needed if you render the chart with its <KLineChart>
component or the ChartCanvas wrapper from react-klinecharts-ui/chart. If you
initialise the chart yourself with klinecharts.init(), you can skip it.
Entry points
Section titled “Entry points”The package exposes three entry points:
// Main: provider, hooks, overlays, indicators, utils, data/constantsimport { KlinechartsUIProvider, useIndicators } from "react-klinecharts-ui";
// Extensions: low-level registration + order line / depth overlaysimport { registerExtensions, orderLine } from "react-klinecharts-ui/extensions";
// Chart: optional thin renderer wrapper (requires `react-klinecharts`)import { ChartCanvas } from "react-klinecharts-ui/chart";Next: build a working chart in the Quick Start.