Reference Keyed Elements: $refs

Learn to retrieve elements referenced with x-ref by using $refs.

We'll cover the following

The $refs property

The $refs property is a magic property that’s used to access elements marked with the x-ref directive. While x-ref gives identity to elements in an AlpineJS component, $refs helps us to retrieve those elements.

Get hands-on with 1200+ tech skills courses.