Closed brightpixels closed 4 years ago
Hi @brightpixels,
Forms fields are the one location where mouse users will predictably have to use their keyboard. Since one major usage of What Input is for styling focus states, I wanted to provide a way to allow developers a way to specify different styling for primary mouse users versus keyboard users. Like in my demo, mouse focus states are subtle blue, while keyboard focus states are bold orange.
Since this may not be how you want to handle things, I provided two indicators: data-whatinput tells you what the input method is instantly in every context. data-whatintent "smooths" out the interactions and persists the mouse state even if someone starts typing in a form field.
Hello, Not sure if I am missing something but why is 'form' mentioned specifically when this library is a solution for any interactive element, regardless it's part of a form or not.