Rounded Rectangle Material

I’d like to make a material that constantly puts a rounded rectangle onto the surface of a plane, but without the stretching that comes with using a texture. Like this picture below

I want to be able to have tons of different sized rectangles all with rounded edges like this that I can place down and stretch at will. I feel like this could be possible using UV coordinates somehow but I don’t know the math. If this isn’t feasible/possible please also let me know so I can find an alternative to use.

Just to be clear, do you want the rectangles to be appearing and moving at runtime? What kind of mesh are you putting this on?