Volcano

API Reference

Kotlin core and Compose public APIs, with a separate React TypeScript reference.

This page covers the Kotlin/Compose artifacts. The npm package has a separate React API Reference; Kotlin types and Compose state are not its TypeScript props.

Core

APIPurpose
HeatmapNodeImmutable hierarchical data model
HeatmapAggregationReduces dense sibling lists into an overview
toDisplayTreeSorts and aggregates a display-oriented tree
HeatmapColorScaleMaps a node to an ARGB color
SignedMetricColorScaleDefault signed negative/neutral/positive scale

HeatmapNode

PropertyMeaning
idNon-blank identifier, unique among direct siblings.
labelText used by default cells, groups, breadcrumbs, and accessibility.
valueFinite area weight. Positive values are visible.
metricOptional finite signed measure used for color and formatted text.
colorOptional ARGB Long overriding the color scale.
childrenNested groups or leaves.
imageUrlOptional loader-owned address; the base artifact never fetches it.

The constructor snapshots the supplied child list. Later changes to the caller's mutable list do not change the node or its cached derived values. Use copy(children = ...) to create updated data.

Transforms include sorted(HeatmapSort), filterLeaves { ... }, aggregateSmallChildren(HeatmapAggregation), and toDisplayTree(...).

Compose

APIPurpose
HeatmapMain responsive CMP heatmap composable
HeatmapStateDrill-down path and selected leaf state
rememberHeatmapStateCreates state from the root node
HeatmapStyleBorder, header, and text colors
HeatmapDisplayPolicyAdaptive cell content and padding rules
HeatmapInteractionSelection, tooltip, long-press, and hover behavior

Heatmap

Heatmap accepts a host-owned Modifier, HeatmapState, color scale, display policy, visual style, interaction policy, callbacks, content slots, motion, and custom tooltip body. It never imposes a width or height. The key callbacks are onGroupClick, onLeafClick, onLeafLongClick, and onLeafHover.

Defaults that affect behavior

APIDefault
Group header clickDrill down enabled
Leaf clickSelect leaf enabled
Long-press tooltipDisabled
Long-press tooltip duration2,000ms; 0 means explicit dismissal
Hover tooltipDisabled
Hover dwell400ms
Drill-down motionEnabled, 180ms
Press feedback0.97 scale, 0.92 alpha
Small-cell policyAdaptive measured content enabled

State and controls

HeatmapState exposes visibleNode, breadcrumbs, selectedNode, selectedId, and canNavigateUp. Its navigation methods are drillDown, navigateUp, navigateTo, navigateToBreadcrumb, and reset. Selection methods are select, isSelected, and clearSelection. HeatmapBreadcrumb, HeatmapBackButton, and HeatmapLegend are optional ready-made Compose controls.

Optional Coil artifact

volcano-compose-coil exposes CoilHeatmapLogo(node, size, modifier). Use it only through the logoContent slot after adding its artifact.

Generated reference

The versioned Dokka API HTML is generated from KDoc for the three published library modules. It is published alongside this guide at Generated API Reference.

The project records Desktop JVM ABI baselines. Compatibility checks run with ./gradlew apiCheck before releases.

On this page