Skip to content
Reeflow
Start Building

Embed SDK Overview

The Reeflow Embed SDK is a lightweight, framework-agnostic library that empowers developers to embed interactive analytics components into any web application. Built on standard Web Components, it provides a seamless way to visualize and interact with your data.

The Embed SDK is a collection of reusable, production-ready Web Components for data visualization and interaction. Think of it as a component library for analytics that works anywhere JavaScript runs.

We chose Web Components because they:

  • Work everywhere - Compatible with vanilla JS and any framework
  • Are standards-based - Built on browser APIs, no proprietary dependencies
  • Encapsulate styles - No CSS conflicts with your existing application
  • Are future-proof - Supported natively by all modern browsers
  • Bundle efficiently - Tree-shakeable and optimized for production

Unlike traditional charting libraries that require complex configuration and custom backends, Reeflow provides:

  • 🔌 Plug-and-play - Add a <reeflow-chart> tag and you’re done
  • 🔐 Secure by default - Built-in authentication and authorization
  • 🎨 Beautiful out of the box - 2 professional themes, light/dark modes
  • 📊 Data-agnostic - Connect to any database via the Reeflow API
  • ⚡ Blazing fast - Optimized rendering for performance
  • 🎯 Type-safe - Full TypeScript support with comprehensive types

The Embed SDK is perfect for:

Provide analytics dashboards to your customers without building custom visualization code:

import { ReeflowProvider, ReeflowBarChart } from '@reeflow/react';
// Embed a complete dashboard in your SaaS product
<ReeflowProvider authToken="customer-specific-token">
<ReeflowBarChart
title="Your Usage This Month"
query={{
from: 'usage_events',
dimensions: ['service_name'],
measures: [{ column: 'count', type: 'sum' }],
}}
/>
</ReeflowProvider>;

Build internal reporting and monitoring dashboards faster:

  • Operations dashboards - Monitor system health and performance
  • Business intelligence - Track KPIs and metrics
  • Executive reporting - Summarize key business data
  • Team analytics - Departmental data views

Present data to end users in a polished, interactive way:

  • Usage reports - Show customers their consumption and trends
  • Financial dashboards - Billing, invoicing, and payment analytics
  • Performance metrics - Display customer-specific KPIs
  • Compliance reporting - Regulatory and audit data

Built with Web Components, the Embed SDK works seamlessly with vanilla JavaScript, React, and any other framework:

import { ReeflowProvider, ReeflowBarChart } from '@reeflow/react';
<ReeflowProvider authToken="token">
<ReeflowBarChart {...} />
</ReeflowProvider>

Full TypeScript support with comprehensive type definitions:

import type { ReeflowBarChart, ReeflowTable, QueryResult } from '@reeflow/core';
const chart = document.querySelector('reeflow-bar-chart') as ReeflowBarChart;
// Fully typed methods and properties
chart.query = {
/* typed query object */
};
await chart.refresh();

Two built-in themes with automatic light/dark mode support:

Default

Warm, modern theme with earthy tones

Ocean

Calming aquatic blues and teals

Learn more about theming and customization.

Interactive, responsive charts:

All charts include smooth animations, interactive tooltips, and responsive sizing.

Powerful data tables with sorting, pagination, and row selection support.

Learn more about tables →

Query your data using an intuitive, JSON-based query language:

{
"from": "orders",
"dimensions": ["product_name", "region"],
"measures": [
{ "column": "revenue", "type": "sum" },
{ "column": "orders", "type": "count" }
],
"filters": {
"order_date": { ">": "2024-01-01" }
},
"order_by": [{ "column": "revenue", "direction": "desc" }],
"limit": 100
}

Learn more about JSONQL →

Get started in minutes:

Terminal window
npm install @reeflow/react
import { ReeflowProvider, ReeflowBarChart } from '@reeflow/react';
function Dashboard() {
return (
<ReeflowProvider authToken="your-token-here">
<ReeflowBarChart
title="Revenue by Product"
query={{
type: 'aggregate',
query: {
measures: [{ column: 'orders.revenue', type: 'sum' }],
dimensions: [{ column: 'orders.product_name', type: 'categorical' }],
},
}}
/>
</ReeflowProvider>
);
}

Embed usage analytics directly into your product:

import { ReeflowProvider, ReeflowLineChart, ReeflowTable } from '@reeflow/react';
<ReeflowProvider embedToken={customerToken}>
<ReeflowLineChart title="API Calls This Month">{/* Usage metrics */}</ReeflowLineChart>
<ReeflowTable title="Recent Activity">{/* Activity log */}</ReeflowTable>
</ReeflowProvider>;

Track revenue, pipeline, and performance:

import { ReeflowBarChart } from '@reeflow/react';
<ReeflowBarChart
title="Revenue by Region"
query={{
from: 'sales',
dimensions: ['region'],
measures: [
{ column: 'revenue', type: 'sum' },
{ column: 'deals_closed', type: 'count' },
],
}}
/>;

Monitor system health and performance:

import { ReeflowLineChart } from '@reeflow/react';
<ReeflowLineChart
title="Error Rate"
query={{
from: 'logs',
dimensions: [{ column: 'timestamp', type: 'time', granularity: 'hour' }],
measures: [{ column: 'errors', type: 'count' }],
filters: {
severity: 'error',
},
}}
/>;

The SDK provides several components for displaying data:

Provider

Context provider for authentication and theming

Learn more →

Workbook

Display complete embedded workbooks with multiple pages

Learn more →

Container

Generic container for custom content with standard Reeflow styling

Learn more →

Ready to dive in?

React Integration

Use Reeflow with React hooks and best practices

Learn more →