API Reference

Reference for HoverKitProvider, data sources, and helpers. Hover the inline terms to explore definitions while you read.

HoverKitProvider

Component

Wrap your app with the provider and pass one or more integration-first sources.

sources
Required
DataSource[]

Array of data sources Cascade will query for each term.

behavior
Partial<HoverBehaviorConfig>

Timing and interaction settings such as delays, max cards, and stack behavior.

highlighting
Partial<HighlightingConfig>

Configuration for auto-highlighting text nodes (strategy, className, exclusions).

Data sources

Adapters
markdownSource
cascade-cards-source-markdown

Globs markdown files, extracts frontmatter, and resolves terms to file content.

restSource
cascade-cards-source-rest

Fetches hover content from a REST API endpoint. Great for live knowledge bases.

Build your own by implementing the DataSource interface:

export interface DataSource {
  name: string;
  resolve(term: string): Promise<DataSourceContent | null>;
}