Consider using native getBoundingClientRec()