Skip to content

Track

Track(__namedParameters): ReactElement

Fire a telemetry event on click (plan 144 TASK-16 / REQ-22, AC-14).

With asChild, it composes onto the single child element rather than wrapping it: the child’s own onClick runs first, and the telemetry fires only if the child did not preventDefault. Because it clones the child (no wrapper element, no added role/tabIndex), the child’s accessible name and disabled state are unchanged (REQ-19). Without asChild it renders a host element (default <span>).

TrackProps

ReactElement