Sorry I deleted my original reply, this is my first engagement in this forum and I asked ChatGPT to rephrase my message, and it sounds too roboty English is not my native language.
below is my 2 cents
First, I just want to make sure that you’re not mixing “State” and “Component.”
If you want to be able to choose different variants for an element, you need to convert that element into a component. For your example, you make the text a component, then you create an option property with labels and values: “Small” and “Medium.”
For the “Small” variant, you set the font size to 14, and in the “Medium” variant, the font size to 16. To do that you bind the font size and use IF formula.
You can apply this to your Card.
Then you’ll be able to choose small or medium on the component.
“State” refers to a condition that triggers a change in the element, like when it’s hovered over, active, or when a user is authenticated.
Nevertheless, if you actually want to use State:
You first define the state on the parent. For example, if the button is the parent, you set the state on the button, and the icon inside the button would be the child. If you set the state on a parent element like a div that wraps the button, then the button becomes the child. To apply the state to the child, you follow this format: {{Parent}}:{{State name}} (e.g., Button Wrapper: New State).