Content pfp
Content
@
0 reply
0 recast
0 reaction

Boyd pfp
Boyd
@andrewboyd
It's amazing how much work it takes to support something that you probably shouldn't do. But — the FormKit floating labels plugin now supports arbitrary prefix content as of 1.5.4: https://formkit.link/76c4b4052d1f224a895783604fe58937
1 reply
0 recast
1 reaction

Darryl Yeo 🛠️ (at Devcon) pfp
Darryl Yeo 🛠️ (at Devcon)
@darrylyeo
That's cool! Only thing I don't like about this is it blocks the click-anywhere-to-focus behavior that you usually get with <label>s (unless that's the intended effect).
1 reply
0 recast
0 reaction

Boyd pfp
Boyd
@andrewboyd
Shouldn’t be! There’s “prefix” content in some of these inputs but they are not labels.
1 reply
0 recast
0 reaction

Darryl Yeo 🛠️ (at Devcon) pfp
Darryl Yeo 🛠️ (at Devcon)
@darrylyeo
I'd much prefer to be able to click anywhere within the box to be honest, including through the prefix content.
1 reply
0 recast
1 reaction

Boyd pfp
Boyd
@andrewboyd
That’s a really good point — and users could easily do that with some handlers. But we can’t make it the default because sometimes you need actions on the prefix content that don’t focus the input so then you’d have to fight against FormKit.
1 reply
0 recast
0 reaction

Boyd pfp
Boyd
@andrewboyd
The fact that this prefix content is just text to show the dynamic positioning is probably a miss. Generally the prefix / suffix slots would be used for additional controls.
1 reply
0 recast
0 reaction