bootstrap-add-clear Bower npm

bootstrap plugin to add a (x) clear button to your input fields

Maintainer: Gus Esquivel
Plugin Website:
Contributers: Stephen Korecky, scoman81, Steve887, Deividy, zarv1k, grrizzly, adambiggs, Vladekk


This project is a fork of Stephen Korecky’s “Add Clear” project. It is meant to work as a drop-in replacement when using bootstrap.

Getting Started

How you acquire bootstrap-add-clear is up to you.


Install with Bower:

bower install bootstrap-add-clear


Install with NPM:

npm install bootstrap-add-clear

If you are using browserify to bundle, you will have to expose jQuery globally:


var $ = require('jquery');
global.jQuery = $;


Clone the boostrap-add-clear repository:

git clone [email protected]:gesquive/bootstrap-add-clear.git

Direct Download

Note: bootstrap-add-clear has a dependency on jquery 1.8+ and Bootstrap 3

Available Options

Option Type Default
closeSymbol string
symbolClass string glyphicon glyphicon-remove-circle
wrapperClass string
top number 0
right number 0
returnFocus boolean true
showOnLoad boolean false
clearOnEscape boolean true
hideOnBlur boolean false
zindex number 100
onClear function null

Using Options

$("input").addClear({top : -2, right : 6});

// Example onClear option usage
  onClear: function(){
    alert("call back!");

// Example font awesome icon usage
    symbolClass: "fa fa-times-circle"

Related Repositories



bootstrap plugin to add a (x) clear button to your input fields ...

Top Contributors

skorecky gesquive Deividy adambiggs grrizzly denisj zarv1k jameswragg Vladekk


-   v1.0.7 zip tar
-   v1.0.6 zip tar
-   v1.0.5 zip tar
-   v1.0.4 zip tar
-   v1.0.3 zip tar
-   v1.0.2 zip tar
-   v1.0.1 zip tar
-   v1.0.0 zip tar