Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Binder

Link a source widget’s trait into a target’s, with an optional linear transform (multiplier/offset) or a nested dotted-path target.

Import

from manywidgets import Binder

Example

Drag the slider — the chart’s width follows value × 100:

API

TraitTypeDefaultDescription
source_widget_idUnicode''widget_id of the source widget.
source_fieldUnicode'value'Source trait to read.
target_widget_idUnicode''widget_id of the target widget.
target_fieldUnicode''Target trait/dotted-path to write (e.g. ‘view_state.zoom’).
multiplierFloat1.0Linear transform multiplier.
offsetFloat0.0Linear transform offset.
labelUnicode''Optional status label.
widget_idUnicode''Stable unique id used for cross-widget linking (auto-assigned).

Binder covers what jslink/jsdlink can’t: a linear transform on the value, or writing a nested dotted-path target (e.g. target_field="view_state.zoom"), merged into the parent dict. For plain pass-through links, prefer jslink — see the linking guide.