Skip to main content
Version: 4.3

HaloHandle

type HaloHandle = Omit<ui.Halo.Handle, "attrs" | "events" | "position" | "name"> & object;

A Halo handle: the React-facing handle config. Mirrors the relevant ui.Halo.Handle fields with React-friendly types (content as a node, contextual events, group in place of native position), plus per-handle makeElement / makeLink factories.

Type Declaration

NameTypeDescription
className?stringExtra CSS class on the handle button.
content?ReactNodeHandle button content. A string is used as raw HTML; a React node is pre-rendered and serialized to static HTML, handle content is presentational (the click is handled by ui.Halo), so static markup is enough. No live re-render inside the content.
defaultAction?stringThe built-in action this handle derives from (e.g. 'fork'); set by getHaloDefaultHandle.
events?HaloHandleEventsPointer / context-menu callbacks; receive { event, x, y, model, paper, graph }.
group?ui.Halo.Handle["position"]Handle group / anchor: the React rename of the native position field. toNativeHandle maps it back to position; getHaloDefaultHandle derives it from the native default's position.
hideOnDrag?booleanHide this handle while dragging.
icon?stringBackground-image icon URL for the handle button.
makeElement?HaloMakeElementElement factory for a clone / fork handle. Return a JointJS element instance or a React ElementRecord (coerced to an ElementModel). Capture per-handle context via the closure; ui.Halo positions the element.
makeLink?HaloMakeLinkLink factory for a link / fork handle. Return a JointJS link instance or a React LinkRecord (coerced to a LinkModel). ui.Halo sets the link's source / target.
name?stringUnique handle key. Optional: when omitted (or duplicated), resolveHandleNames generates a stable handle-<index> name.
title?stringTooltip text set as the title attribute on the handle button.

Stay in the know

Be where thousands of diagramming enthusiasts meet

Star us on GitHub