How to set element's interactive area to content instead of the default rectangle

Any advice❔