Skip to content

Installation

react-klinecharts-ui ships as ESM + CJS with TypeScript types. Install it alongside its peer dependencies react, react-dom and klinecharts.

Terminal window
npm install react-klinecharts-ui klinecharts
PackageRequiredVersion
reactyes>= 17.0.0
react-domyes>= 17.0.0
klinechartsyes>= 10.0.0
react-klinechartsoptional>= 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.

The package exposes three entry points:

// Main: provider, hooks, overlays, indicators, utils, data/constants
import { KlinechartsUIProvider, useIndicators } from "react-klinecharts-ui";
// Extensions: low-level registration + order line / depth overlays
import { 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.