vue find out the width of a component before it renders code example Example: vue js get width of element this.$refs.refName.clientWidth