Or is it better to have the input and button separate? I kind of like the above examples as they are fairly simple and think they show the whole form as one element.
For me this is ok, as long as you set a big enough padding-right to the input field so that if the user enters a long phrase this is not hidden by the button