tjikko-studio / components

Component library for Tjikko Studio apps
0 stars 0 forks source link

Handle focus without JS #53

Closed shawninder closed 3 years ago

shawninder commented 3 years ago

There's no need for Javascript to handle focus interactions. Just use CSS (tailwindcss also has features for this)

shawninder commented 3 years ago

When it comes to input fields with icons in particular, you can add an icon to a field using ::before and affect its style on focus with input:focus::after

shawninder commented 3 years ago

To show off the focus state easily and controllably in Storybook, perhaps we could consider something like the pseudo-states addon?