Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.
/ react-checkbox Public archive

An unstyled checkbox that contains all the logic for a checkbox so you can focus on the styling

License

Notifications You must be signed in to change notification settings

snowcoders/react-checkbox

Repository files navigation

Deprecation notice

The majority of what this package did is hide the checkbox and provide a way to add your own styled checkbox. However now that IE 11 is deprecated, the css property all: unset works across enough browsers that it doesn't make sense to maintain this project.

If you want to create your own custom checkbox, there are tons of tutorials that show you how to use :before to create your own styled checkbox, however the new update is to just unset all the fields for the input itself that way it doesn't show up.

input[type=checkbox] {
  all: unset;
}

An unstyled React checkbox

npm (scoped) CircleCI branch

Use it

npm install --save @snowcoders/react-checkbox save-prefix "~"

Parent Library

This component is part of a larger components library, react-ui-base. The goal is to keep all the core logic and base css styles in a single location, that way building out new UI component libraries cheaper and faster (and less buggy).

We highly recommend visiting the react-ui-base repository to understand how to customize the css along with see examples.

You can also view all the components on our demo site https://snowcoders.github.io/react-ui-base/

This component

Renders a simple checkbox component with a button as the main visual element that triggers a checkbox element. This allows for greater css customizations while maintaining the same API as a checkbox.

About

An unstyled checkbox that contains all the logic for a checkbox so you can focus on the styling

Resources

License

Stars

Watchers

Forks

Packages

No packages published