Tagify class and count options

I would like to join this discussion and ask - what’s purpose of Class Field and Count Field?
What’s potential usage of these parameters?

image

Class field allows you to add a custom class to the tag, you could use that to style the tag differently depending on the data.

The count field allows you show the count of an item (will only show in the dropdown of the tagify component), for example how often a specific tag is used in your app.

May I ask you to provide some simple example of using Class field for instance changing text color?
I’ve tried to set CSS class “color-red” and some other primitives - but none of them worked.

sam_sip_location=='RIX' ? 'background-color:powderblue' : ''

Bump. I can’t get this class to do anything useful and no documentation available.

You can store a class name in your database and select it in the class option in the UI. The class will be applied to the item in the list.

Is that seriously the only way ???? Styling should be kept out of your DB

Well you can also write expressions like:

tag-class="categoryid == 1234 ? 'text-danger' : 'text-primary'"

where text-danger and text-primary are class names.

You can't use values like that. The value expected here is a class name.

Thank you for explanation. Will try.