Skip to content

Installation

react-klinecharts requires React 17, 18, or 19 and klinecharts v10.

Terminal window
pnpm add react-klinecharts
Terminal window
npm install react-klinecharts
Terminal window
yarn add react-klinecharts
Terminal window
bun add react-klinecharts

klinecharts is installed automatically as a regular dependency, so you don’t need to add it yourself. React and React DOM are peer dependencies — make sure they’re installed in your app:

Terminal window
pnpm add react react-dom
Terminal window
npm install react react-dom
Package Version
react ^17.0.0 || ^18.0.0 || ^19.0.0
react-dom ^17.0.0 || ^18.0.0 || ^19.0.0
klinecharts ^10.0.0 (bundled)
Node.js >= 18
import { KLineChart } from "react-klinecharts";
export default function App() {
return (
<KLineChart
data={[
{ timestamp: 1, open: 1, high: 2, low: 0, close: 1.5, volume: 10 },
]}
style={{ width: "100%", height: 400 }}
/>
);
}

If you see a chart, you’re good to go. Continue to Quick Start.