Documentation
@chartts/reactReact
Native React package with hooks, refs, and full TypeScript support. Works with Next.js, Remix, Vite, and any React setup.
Installation
npm install @chartts/react
Basic usage
import { LineChart } from '@chartts/react'
export function Dashboard() {
return <LineChart data={data} x="month" y="revenue" />
}Hooks
useChartRef() gives you imperative access to the chart instance. useChartData() manages reactive data updates. useChartTheme() provides theme context for nested charts.
Server Components
Chart.ts charts are client components (they use refs and effects). Wrap them in a client boundary. Data fetching stays in your server component - pass data as props.
Next.js
Works with Next.js App Router and Pages Router. SSR renders static SVG. Client hydration adds interactivity. No special configuration needed.