Scroll Into View Action

Invoke the specified event when the element scrolls into view

Use Cases

  • Trigger a modal

Usage Notes

sa-action-scrollintoview = ( event name )

Place on any element that should be invoke the specified event when it is scrolled into view.

Assign whatever event name you like, depending on your trigger-event-action setup.

<div sa-trigger-scrollintoview="my-event"></div>

Future

https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView

sa-action-scrollintoview:behavior

  • smooth ( default )

sa-action-scrollintoview:block

  • center ( default )

sa-action-scrollintoview:inline

  • nearest ( default )

Last updated

Was this helpful?