Replace intro with message
You can request a rebuild in form submit and then add the message to the top of the form:

  public function buildForm(array $form, FormStateInterface $form_state) {

    if ($form_state-&gt;isRebuilding()) {
      $name = $form_state-&gt;getValue('name');
      $form['header'] = [
        '#type' =&gt; 'container',
        '#attributes' =&gt; ['class' =&gt; ['form-header-message', 'alert', 'alert-success']],
        'message' =&gt; [
          '#markup' =&gt; $this-&gt;t('Thank you for submitting this form, %name!', ['%name' =&gt; $name]),
        ],
      ];
    }

    $form['name'] = [
     '#type' =&gt; 'textfield',
     '#title' =&gt; $this-&gt;t('Name'),
    ];
    $form['submit'] = [
      '#type' =&gt; 'submit',
      '#value' =&gt; $this-&gt;t('Submit'),
    ];

    return $form;
  }


  public function submitForm(array &amp;$form, FormStateInterface $form_state) {
    $form_state-&gt;setRebuild();
  }