Alpine's Anchor plugin allows you to easily anchor an element's positioning to another element on the page.
frameworkreactivedeclarativeplugin
https://alpinejs.dev/plugins/anchor