files/en-us/web/api/snapevent/snaptargetblock/index.md
{{APIRef("Snap Events")}}{{SeeCompatTable}}
The snapTargetBlock read-only property of the
{{domxref("SnapEvent")}} interface returns a reference to the element snapped to in the block direction when the event fired.
Specifically:
The property values available on SnapEvent correspond directly to the value of the {{cssxref("scroll-snap-type")}} CSS property set on the scroll container. snapTargetBlock only returns an element reference if the snap axis is specified as block (or a physical axis value that equates to block in the current writing mode) or both.
A {{domxref("Node")}} representing the snapped element, or null if scroll snapping only occurs in the inline direction so no element is snapped to in the block direction.
If the snapped element was a pseudo-element, the returned Node will be the owning element of that pseudo-element.
See the main {{domxref("SnapEvent")}} page for brief examples, and our Using scroll snap events guide for full examples and explanation.
{{Specifications}}
{{Compat}}