Installation
Pick the right ChartForge package — batteries-included, compose-your-own, or headless React primitive.
ChartForge ships as six tree-shakeable packages under the
@elitechart/* scope. Pick the one that matches your goal — you
almost never need all six.
Three install paths
| Goal | Install | Bundle |
|---|---|---|
| Drop in a finished trading chart with toolbar, drawings, indicators, replay, and themes — zero wiring. | @elitechart/elitechart | All-in-one |
| Compose your own UI around the rendering engine — bring your own toolbar, watchlist, and screen layout. | @elitechart/core + (optional) @elitechart/themes, @elitechart/indicators, @elitechart/drawings | À la carte |
Headless React primitive — a minimal <Chart /> component plus hooks, mounted into your own DOM. | @elitechart/react (+ @elitechart/core peer types) | Smallest |
Path A — @elitechart/elitechart (recommended)
The fastest way to ship a real trading chart.
EliteChart already bundles @elitechart/core, @elitechart/themes,
@elitechart/indicators, and @elitechart/drawings internally — you
do not need to install them separately.
| Peer dependency | Required version |
|---|---|
react | >=18.3.0 |
react-dom | >=18.3.0 |
Path B — Compose your own UI
Pick the rendering engine and assemble whatever surface your product needs (custom toolbar, custom watchlist, custom layouts).
Add-on packages
@elitechart/themes—darkTheme,lightTheme,applyTheme(), plus helpers for custom palettes.@elitechart/indicators— 50+ pure-function technical-analysis indicators, each with its own subpath import:@elitechart/drawings— drawing-tool primitives (trend lines, channels, Fibonacci retracement, rectangles, etc.).
Each add-on is tree-shakeable: importing one indicator pulls in only its math, not the rest of the catalogue.
Path C — @elitechart/react (headless)
Minimal React adapter — a <Chart /> that mounts the engine into a
<div>, plus two hooks. Use this when you already have a chrome
layer (toolbar, sidebars, etc.) and just need a chart primitive.
@elitechart/react already prepends 'use client'; to its bundle,
so it's safe to import directly from a Next.js Server Component file
— Next will treat it as a client boundary automatically.
Stylesheet (EliteChart only)
@elitechart/elitechart ships a precompiled stylesheet. Import it
once near your app's root:
Vite / CRA equivalent goes in src/main.tsx. The stylesheet is
namespaced — class collisions with your app's own Tailwind only
happen if you deliberately reuse the same custom utility names.
TypeScript
ChartForge is written in strict TypeScript with branded types for
financial primitives (Price, TickSize, TimestampMs, Volume).
Construct branded values via the as* helpers:
This rules out unit-mismatch bugs at compile time (e.g. passing seconds where milliseconds are expected).
Node version
ChartForge requires Node 20.11 or newer for development. Runtime support targets evergreen browsers (Chrome, Safari, Firefox, Edge) plus iOS Safari 16+ and Android Chrome.
What's next?
- Quickstart — first chart on screen.
- Next.js App Router — SSR safety + dynamic import patterns.
- API Reference — full TypeDoc reference, package by package.