CSS checkbox examples
getcssscan.com
getcssscan.com
Please consider accessibility when you have the urge to build custom (form) components. For checkboxes, have a look at https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/ for some guidelines.
Doesn't work for me on chrome mobile without JS.
Browsers recently rushed the dialog element and still have no easy solution for this.
Almost everyone else is "screw this, we're going to use links as buttons and divs as lists".
We front-end devs would benefit from a lot more works of art like this, and then people trying to implement them into real systems would need to make them accessible. Similar to how we benefit greatly from Dribbble. If we don't allow for unrestricted just artistic bits like this, then creativity suffers.
Counterargument to myself: the click to copy though makes it seem like it's ready to use, and many newer devs would just use them straight away. It's on the hands of more senior devs to tell them that these snippets, similarly to many StackOverflow ones, need to be adapted to integrate in an actual app for things like accessibility, uniformity, etc.
1. Crosses and squares being used instead of check marks.
2. Circles being used as containers instead of boxes.
3. Toggle switches being presented as checkboxes.
Maybe 5-10 of these are good inspiration for checkboxes.
In other news:
Nuclear power plant steering group improves reactor proposal! Committee stalls debating shade of yellow to be used for lines in parking lot.
I'm using a Chrome plugin Vimium - one of the shortcuts 'f' (documented as opening links) actually highlights all focusable elements. Using this feature shows most of the checkboxes are interactive.
Edit: I guess the reason for me pointing this out is hopefully there's an easy way to make these more accessible for keyboard users.
Though if your "checkbox" is to take effect immediately, consider using a toggle button: https://react-spectrum.adobe.com/react-aria/useToggleButton....
They look great, but I would warn developers to use them as inspiration but not as-is.
Lots of these made for a nice showcase but should never be used in a product ever - just horrendously unintuitive. For some, I wouldn't even know they were checkboxes if the page wasn't titled "here's a bunch of checkboxes". But a few of them were actually quite nice, accessible, and pleasantly useable.
Ultimately it seems that the checkboxes that were closest to the native OS checkboxes were the ones I enjoyed trying the most. I guess that's a predictable outcome. But it might be an indication that the further one strays from the OS defaults, the less good of a design it is? Maybe checkboxes are a solved problem, and there is only narrowly limited room for a brand to apply its personality on form controls before they become less usable for the sake of being "unique".
#33 was by far my favourite, for the record.
That "pulse" on activation is pretty much Material Design. https://material-components.github.io/material-web/demos/che...
Some of the others are pretty nice though!
happy css scan customer here. just used it today to grab some annoying css.
feature request: convert the css to react style objects. i hate that i need to use react styles (just fix jsx! urgh.) but i had to constantly use https://staxmanade.com/CssToReact/ to convert it
Nice, yes, I plan to add "copy to react" feature soon. Will let you know when it's ready
It's nice that there's all this "free" stuff that I can see and play with and just click to copy and drop into my own project without any thinking or worrying about buying UI kits…
… But I write novel CSS too. It's a very real part of my livelihood and this company is selling a product that can take my work without any attribution in the copied code. And then they seemingly use that work to market their product.
Important to remember that [even good] attribution is no substitute for an actual license to use somebody else's code. It's piracy. You wouldn't steal a policeman's helmet, etc.
Switches imply that changing the value has an immediate effect (i.e., the change is immediately saved). Checkboxes do not, and should have a corresponding Save button.
Switches were popularized by iOS, where they almost always have immediate effect. Checkboxes have been around much longer on the web, and have almost never had immediate effect (hell, it wasn't even possible until Web 2.0).
I now live in a country which uses ticks to check a box, but I grew up in a country that uses crosses to check a box and had no idea what a tick was until I moved here.
Most pure CSS checkboxes make heavy use of pseudo-classes and pseudo-elements - but it is very possible to make these sliders without JS!
It looks so...juicy.
It's very hard to tell if it's On or Off when it's a monochrome slider.
And... most of the sliders shown fail miserably. come on guys you are not helping my perception that design is a sick profession.