DreamLake
Browse docs

Schema API

Use this reference for existing sources/panels integrations. A source selects a storage driver and format reader; panels bind its fields to views. For new dataset viewers, start with Dataset and .dreamrc. The two APIs have different schemas and React entry points.

Quick start

Pass a parsed VizSchema to DatasetPreview. This LeRobot example omits panels to generate a layout from the episode's available fields:

Auto-laying out…
Code AutoLayoutSpec.tsx
tsx
import { DatasetPreview } from "@dreamlake/viz/schema-viz";
import type { VizSchema } from "@dreamlake/viz/schema-viz";

const schema: VizSchema = {
  version: 1,
  sources: {
    episode: {
      adapter: "lerobot",
      episode: 0,
      storage: { driver: "hf", id: "lerobot/aloha_static_coffee" },
    },
  },
};

export function Episode() {
  return <DatasetPreview schema={schema} />;
}

Add panels to select cameras or joint traces and control their arrangement. Parse YAML in your application before passing the object to DatasetPreview.

How to read these docs

Follow schema configuration to bind fields. Choose storage for access, an adapter for the format, and views for display.

For a custom reader or view, use the Model contract.

DatasetPreview props

PropTypeDefaultMeaning
schemaVizSchemarequiredParsed sources and optional panels.
layout'grid' | 'row''grid'A vertical layout or compact horizontally scrolling row. Views without row support are skipped in row mode.
clockTimelineClock | nulllocal clockOptional shared playback clock.
extensionsDatasetPreviewExtensionsomittedStorage, adapter and view registrations. See registration behavior.
classNamestringomittedContainer classes.
scrollRefReact.Ref<HTMLDivElement>omittedReference to the outer container.