In a writing a Views style plugin, how can I create a text input that accepts Twig?
To replace argument tokens in a Views plugin you need:

$tokens = $this-&gt;view-&gt;build_info['substitutions'];
$value = $this-&gt;viewsTokenReplace($value, $tokens);


If you've based your plugin on StylePluginBase you can use StylePluginBase::tokenizeValue, which additionally replaces row tokens as well.