Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
awesome-bootstrap-checkbox
Advanced tools
Font Awesome Bootstrap Checkboxes & Radios. Pure css way to make inputs look prettier.
Font Awesome Bootstrap Checkboxes & Radios plugin. Pure css way to make inputs look prettier. No javascript!
First just include awesome-bootstrap-checkbox.css somewhere in your html. Or awesome-bootstrap-checkbox.scss if you use sass. Next everything is based on code convention. Here is checkbox markup from Bootstrap site:
<form role="form">
...
<div class="checkbox">
<label>
<input type="checkbox"> Check me out
</label>
</div>
...
</form>
We have to alter it a bit:
<form role="form">
...
<div class="checkbox">
<input type="checkbox" id="checkbox1">
<label for="checkbox1">
Check me out
</label>
</div>
...
</form>
That's it. It will work. But it will not work if you nest input inside label or put label before input.
If you want to enable Opera 12 and earlier support just add class styled
to input
element:
...
<input type="checkbox" id="checkbox1" class="styled">
...
It's the same for radios. Markup has to be the following:
<form role="form">
...
<div class="radio">
<input type="radio" name="radio2" id="radio3" value="option1">
<label for="radio3">
One
</label>
</div>
<div class="radio">
<input type="radio" name="radio2" id="radio4" value="option2" checked>
<label for="radio4">
Two
</label>
</div>
...
</form>
You may use checkbox-primary
, checkbox-danger
, radio-info
, etc to style checkboxes and radios with brand bootstrap colors.
checkbox-circle
is for rounded checkboxes.
checkbox-single
and radio-single
for inputs without label text.
If you want to use glyphicons instead of font-awesome then override .checkbox
class:
.checkbox input[type=checkbox]:checked + label:after {
font-family: 'Glyphicons Halflings';
content: "\e013";
}
.checkbox label:after {
padding-left: 4px;
padding-top: 2px;
font-size: 9px;
}
As per example in the demo
folder, to use these awesome you'll have to @import
the following library parts:
@import "../bootstrap/bootstrap/variables";
@import "../bootstrap/bootstrap/mixins";
@import "../font-awesome/variables";
Adjust this to the path where your bootstrap and font-awesome files are located.
Based on Official Bootstrap Sass port and awesome Font Awesome.
FAQs
Font Awesome Bootstrap Checkboxes & Radios. Pure css way to make inputs look prettier.
The npm package awesome-bootstrap-checkbox receives a total of 9,032 weekly downloads. As such, awesome-bootstrap-checkbox popularity was classified as popular.
We found that awesome-bootstrap-checkbox demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.