How can a link a button to text/sms function?

Hi everyone, if I want a button to open a user’s native text/sms when they click a button, how would I do so? At the moment I see you can link phone calls but not texting.

Assuming you know the phone number in advance, you can just use the sms: protocol and place it in a link.

You can specify a message, too;

sms:+1234567890?body=Hello%20there!

image

Maybe hide this on desktops and tablets, since only phones would be able to make use of this link.