How can I use a replacement pattern in a custom field?
Take a look to \Drupal\views\Plugin\views\field\FieldPluginBase::renderText

/**
* {@inheritdoc}
*/
public function render(ResultRow $values) {
  $tokens = $this-&gt;getRenderTokens($this-&gt;options['text']);
  return [
    '#theme'  =&gt; 'custom_button',
    '#target' =&gt; $this-&gt;options['target'],
    '#class'  =&gt; $this-&gt;options['class'],
    '#text'   =&gt; $this-&gt;viewsTokenReplace($this-&gt;options['text'], $tokens),
  ];
}