How can i get any html element position and size (width and height ) on Vue-Cli 3 like button, input ,div

Hello friends;
I need to get an element position and element size (width,height) in vue-cli3. I tried somethings. But I cant make it. I Shared it below this. Anyone give me some suggestion? I want to get value in mounted hook for this. I cant use target or MouseOver events. Thanks from now.

This is not working.

this.$refs.elementRef.getBoundingClientRect()

Please provide more of your related code.

If you the ref you are accessing is a component, you need to use the $el property to reach the DOM element.

Hey James;
$el proporty give me html component types and html component attributes. But I want to need only html component position in DOM. X,Y and Top, Left Bottom, Right pixels like this.

$el would be how you gain access to those, but again, unless you provide more code it’s impossible to know what you are doing.

I shared a jsfieddle for you easier.

https://jsfiddle.net/mahiraltinkaya/u24xLh63/53/