My understanding is that the state is managed internally by weweb and is not automatically switched when you focus the input, like what happens for hover state.
For a “onfocus” workflow trigger to manage focus events you need to ask the weweb team.
If you use the workaround that I describe here you can activate your element state by binding the state condition.
In that example you keep track of the focused element updating a variable with the name of the element (the one in the settings panel), so you can bind the focus condition to that.
Something like this:
@Aurelie & @Flo is there a more “natural” HTML way to do this?
I thought the new states were solving this use case. Perhaps I misunderstood.
It’s seems like a lot of no-code to do such a simple thing.
Have a nice evening.
The default state style will cascade to all the states as is normal in HTML&CSS. You can specify styles for states such as hover that then will override the default state style. For example, on hover of a button you want to change the background color. If the style didn’t cascade you would have to set all the style again just to change the background color.