{classes} writes the value of a class attribute:
<div class="{classes 'panel', active=$isActive, invalid=$hasErrors}">. An
item without a name is always in - a text of one or more names separated by spaces, or an array
of them. An item name=condition adds the name when the condition is true; an empty
array counts as false. The result is deduplicated, in the order the names first appear, and
escaped.
It replaces the chains of {if} that conditional classes otherwise need, and the
names may contain dashes - is-open=$open. Like {attrs}
it reads its items raw, so any name is a class name, never an engine option. Inside a loop, a
property reads as a condition: first=first@items.