A lightweight jQuery plugin to create animated, responsive skill bars for your web projects.
The jQuery Simple SkillBar plugin provides an easy way to display skill levels or progress indicators on a webpage. It is customizable, responsive, and includes a smooth animation effect as the bar fills up to the specified percentage.
- Responsive: Adapts to the width of its container.
- Animated: Smoothly fills from 0% to the target value.
- Customizable: Control dimensions, colors, and values via data attributes or JavaScript options.
- Lightweight: Minimal code with no external dependencies other than jQuery.
-
Include jQuery: Ensure you have jQuery included in your project.
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
-
Include the Plugin: Add
simple-skillbar.js(orskills.js) to your project.<script src="js/skills.js"></script>
Note: You can use either
js/skills.jsorjs/Animated-Responsive-Skill-Bar-Plugin-jQuery-Simple-SkillBar/simple-skillbar.js. -
Include CSS (Optional): While the plugin handles basic styling inline, you may want to include
css/style.cssor your own styles for container layout.
Create a container element for each skill bar. You can specify configuration options using data-* attributes.
<div id="skill-1"
data-width="90"
data-background="#2ecc71"
data-text-color="#ffffff">
HTML5
</div>
<div id="skill-2"
data-width="80"
data-background="#3498db">
CSS3
</div>Initialize the plugin on your selected elements using jQuery.
$(document).ready(function(){
$('#skill-1').simpleSkillbar();
// You can also pass options directly in JavaScript
$('#skill-2').simpleSkillbar({
width: 85,
height: 40,
background: '#e74c3c',
textColor: '#fff'
});
});The plugin accepts the following options, which can be passed via the initialization function or set as data-* attributes on the HTML element.
| Option | Data Attribute | Default | Description |
|---|---|---|---|
width |
data-width |
80 |
The target percentage of the skill bar (0-100). |
height |
data-height |
30 |
The height of the skill bar in pixels. |
background |
data-background |
#337ab7 |
The background color of the filled portion of the bar. |
textColor |
data-text-color |
#ffffff |
The color of the text label inside the bar. |
This project is licensed under the MIT and GPL licenses.