
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
angular-bootstrap-checkbox
Advanced tools
A checkbox for AngularJS styled to fit the Twitter Bootstrap standard design
A checkbox for AngularJS styled to fit the Twitter Bootstrap standard design
Screenshot:
The standard checkboxes which use the input HTML element just don't look good in combination with Bootstrap.
Surprisingly, I could not find any nice looking, simple checkbox, so I built one. It is based on a button and Glyphicons which behaves like a normal checkbox.
The angular-bootstrap-checkbox is compatible to the use of the original AngularJS input[checkbox], with one minor change: while the original implementation allows an "uninitialized" or other then defined state of the model this one forces "false" or "ng-false-value" (not checked) when not set to "true" or "ng-true-value".
$ bower install angular-bootstrap-checkbox --save
Add "ui.checkbox" to your modules list. Then you can use it like AngularJS input[checkbox]:
<checkbox
ng-model="checkboxModel"
name="custom-name" (Optional)
ng-true-value="The Truth" (Optional)
ng-false-value="The Untruth" (Optional)
ng-change="onChange()" (Optional)
indeterminate="true" (Optional)
ng-indeterminate-value="test" (Optional)
></checkbox>
Additionally you can set the size:
<checkbox ...></checkbox> (Normal size, corresponds to 'btn-xs')
<checkbox large ...></checkbox> (Large, corresponds to 'btn-sm')
<checkbox larger ...></checkbox> (Larger, corresponds to Button default size)
<checkbox largest ...></checkbox> (Largest, corresponds to 'btn-lg')
And also style the checkboxes like Bootstrap buttons:
<checkbox class="btn-primary"></checkbox> (Looks like primary button)
<checkbox class="btn-success"></checkbox> (Looks like success button)
<checkbox class="btn-info"></checkbox> (Looks like info button)
<checkbox class="btn-warning"></checkbox> (Looks like warning button)
<checkbox class="btn-danger"></checkbox> (Looks like danger button)
See index.html and app.js for examples and how it works.
Start web server e.g. via Python:
$ python -m SimpleHTTPServer 8000
Start Karma E2E tests (has to be installed globally before):
$ karma start
Copyright (c) 2016 Sebastian Hammerl, Getslash GmbH
Licensed under the MIT License
FAQs
A checkbox for AngularJS styled to fit the Twitter Bootstrap standard design
The npm package angular-bootstrap-checkbox receives a total of 2,006 weekly downloads. As such, angular-bootstrap-checkbox popularity was classified as popular.
We found that angular-bootstrap-checkbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.