How to partially update className?

I might miss something obvious, but how can I update just some class in className, keeping the existing ones? I have a feeling I have seen an example somewhere, but can’t find it again.

Hi,

are you referring to this?

className='d-flex align-items-center')

Yes, I need different classes depending on state. I would use className=“… {something if condition else other}…” but it’s not clear to me how to know which values to use as input. My guess is that it is related to my previous question where I learned that pattern-matching callbacks are the thing to use.

Here is an example where the background color of a html.Div is changed depending on a Input() of a callback:

Maybe this gives you an idea.

Yeah, thanks!