Define HTML element classes with pattern fields I want to use drupal fields to define class names in ui_patterns. i.e. define a field in a pattern twig.html file and use its {{ twig variable }} as a class name. The following doesn't work. Is there a correct way of doing this? even possible?

{%
set classes = [
'class_name_1',
'class_name_2',
{{ ui_yml_field_name }},
]
%}
&lt;div{{ attributes.addClass(classes) }}&gt;
yaml_field_name.field_drupal_machine_name[0]['#markup'] gave me the selection. problem solved.