I found a really simple way to make the width of a button dynamic! just one line of code.
layerName.html.length <-- Tells you how many characters in the layer(When you use html: "something something").
So you can apply that value to many cases. Not a fancy prototype, but this is so userful! :)
Ha, clever! It will start to become a bit less precise if you add HTML tags, because those will be added to the character count too. If you want to be more exact, there’s a hidden utility method (consider it ‘beta’ quality) that will calculate the size of a piece of HTML. As a second argument (not demonstrated in my prototype) you can pass it a dictionary with styles (such as font, font size, etc.) https://framer.cloud/FhLHs/
Aha, Utils.textSize(string) & Utils.frameInset(string, padding?) makes the same effect when you apply some inline styling. Nice one!