The Feature Request
There are some HTML attributes that don't have a way to specifiy if the attribute is enabled or disabled, and there are some attributes that don't allow a blank value (e.g. aria-current). Using the disabled attribute as an example, if a button is enabled, it would be:
If a button is disabled, it would be:
<button disabled>Test</button>
Unless I have missed something in the documentation, the only way I can see to do this in SuperHTML is to use <ctx :if="condition"> and write the whole button HTML twice, one for if it's enabled and one for if it's disabled.
The Feature Request
There are some HTML attributes that don't have a way to specifiy if the attribute is enabled or disabled, and there are some attributes that don't allow a blank value (e.g.
aria-current). Using thedisabledattribute as an example, if a button is enabled, it would be:If a button is disabled, it would be:
Unless I have missed something in the documentation, the only way I can see to do this in SuperHTML is to use
<ctx :if="condition">and write the whole button HTML twice, one for if it's enabled and one for if it's disabled.