Unfortunately, almost all of them are terrible for accessibility. Most of them cannot be focussed by keyboard. And even more do not have a focus styling. I did not check their code, but that alone does not make a good impression.
Tailwind UI's checkboxes (https://tailwindui.com/components/application-ui/forms/check...) are fine, accessibility-wise. They can be tabbed to using the keyboard, they are proper <input type="checkbox"> elements in the DOM, they can be activated using the space key, they can be activated by clicking on their label.
It's kinda dangerous for the webpage to include the checkbox code to be copied as this. It's commercial product and from seeing tailwind public relations they are super stingy about it.
Javascript is actually great for accessibility, it’s really hard to properly implement WAI-ARIA without it. Most people with screen readers will have js enabled too.
Tailwind is one of the vanishingly few css frameworks/css utility collections/css design systems that is really, really good about keeping semantic meaning of things and accessibilty intact, and whose examples show how to implement them correctly.
Almost everyone else is "screw this, we're going to use links as buttons and divs as lists".
This seems more like a gallery of art/starting point than a "use this as-is", so I'm sad to see this comment on the top of HN since as a show of what can be accomplished with checkboxes it's amazing.
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.
I am so sad anyone can look at this amazing resource and with a straight face say that only 10% of it is valid as an inspiration. It's a magnificent source of inspiration! Sure some are not perfect, but that doesn't detract from the overall goal.
Naming element types by their style or form (box) rather than features in an implementation that encourages separating style leads to a more general problem.
Incidentally most of them _are_ focusable by the keyboard but just aren't tabbable.
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.
It was a fun exercise to go through each of the designs in this gallery and evaluate each one. It's easy to do that for individual form controls as design elements!
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".
Some of these don't look like checkboxes at all, and wouldn't trigger any indication that they could be changed. For example, if I saw number 44 next to a line of text, I'd think "that must be something not available for some reason" rather than "I could click that to choose it".
Same with 50 and 26 (that's a stop sign!) - they look like bullet points.
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
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.
I'd like to remind folks that switches and checkboxes mean two different things. Please do not use them interchangeably on the web.
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).
Thought I'd take this opportunity to thank you for your work. I came across your site searching for a box-shadow the other day, after spending too long attempting it myself
Number 44 has issues internationally as it toggles between a tick and a cross.
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.
The only clear and no margin for confusion is the one with "X" vs "check" inside the circle. If that "X" would be red and the check green that would add even more clarification. I hate UI's where I have to click everything first in order to understand what's what, I prefer intuitive design instead.
While these are all cool, the tool they're selling just openly is made for stealing styles from other pages? I mean I get that CSS isn't copyrighted (specifically), but it does just seem like its a tool made for stealing other peoples work?
I’m on mobile right now so can’t check the source code, but the transition duration of many (most?) of these are way too long, feels very janky. Some also seem to have a noticeable delay before the transitions even begin (Safari on iPadOS 16.1).
Funny you mention that, because hidden check boxes and radio inputs are often used creatively (in a kind of horrifying way) to store app state and avoid using JavaScript entirely, while still having complex animations. For instance, you can make a fully functional image gallery carousel with controls to navigate between each image with zero JavaScript like this, and this is just one of the simplest examples.
Tailwind UI is a commercial product, no? Whether the checkbox CSS meets the threshold for copyright or not, I'm not sure encouraging folks to copy its styles is a great idea.
It shows some signs of comeback. The problem with the last skeuomorphic design trend was that it wasn't "honest", for example leather elements didn't behave like leather and the illusion quickly fell apart making it tacky. With the current performance of the devices we can have much more convincing materials and object designs. Apple's blurry glass design on iOS and macOS is very nice for example, it blends the background very nicely and the way the colors bleed you can tell. that this is not simply a blur effect.
Color is nice but it should never be required to determine widget state. there should always be indicators showing on and off and what state the widget in in.
And... most of the sliders shown fail miserably. come on guys you are not helping my perception that design is a sick profession.
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.