Installation and Usage Guide

This guide tells you everything you need to know to install Bootstrap Arrows into your project and get it up and running.


Bootstrap Arrows works in a restricted form independently of any 3rd party code. However, to use the multi-angle feature, jQuery is required.

Although Bootstrap Arrows matches the look and feel of Bootstrap's button colours and style it does not actually have a dependancy on the Bootstrap framework.


Installing is simple. Place the bootstrap-arrows.js file in the your preferred js directory. Most likely this will be the same directory where you placed the jQuery and Bootstrap JavaScript files. This can be anywhere in your file structure but I recommend placing it in /assets/js.

Next, place the bootstrap-arrows.css file in your CSS folder. This can also be anywhere but I recommend placing it in /assets/css.

And finally put the arrows.png sprite image into your image folder. To save having to update the image reference in the bootstrap-arrows.css file place the image in /assets/img.

Reference the CSS within the <head> of your document, like this <link href='/css/bootstrap-arrows.css' data-angle='stylesheet' type='text/css' />

Then reference your JavaScript files at the bottom of your document just above the </html> tag. With the jQuery and Bootstrap references already in place, add the reference to the bootstrap-arrows.js like this <script type="text/javascript" src="js/bootstrap-arrows.js"></script> and you're ready to use it.


Now that all the requirements are in place you're ready to use Bootstrap Arrows.

Draw your first arrow with <span class='arrow'></span>

You should see an arrow like this one:

If you need arrows that point in directons other than up, initialise the bootstrap-arrows.js jQuery plugin, which dynamically adds the CSS3 rotate transform attribute to specified arrows, allowing you to have each arrow point at any angle from 0 to 360 degrees.

Inside the $(function () { and }); tags initialise the plugin with $('.arrow, [class^=arrow-]').bootstrapArrows();.

Now you can point an arrow to any angle by specifying the angle inside the data-angle tag of the element. For instance, <span class='arrow' data-angle='45'></span> will render the default grey arrow pointing to 45 degrees, like this one:

You can also use the larger arrow format: <span class='arrow-large' data-angle='45'></span> which will render an arrow like this one:

Bootstrap supports the same type of formats as Bootstrap Alerts. So you can add -primary, -info, -success, -warning, -danger, and -inverse to any arrow to get different colours.

Using <span class='arrow-primary' data-angle='90'></span> will render a blue arrow like this one:

Colours and sizes can be used in conjunction with each other too, so using <span class='arrow-success-large' data-angle='180'></span> will render a large green arrow like this one:

More Demos

There are dozens of demos on the homepage, multi-angle demos and demos with other colours.

Thanks for trying out Bootstrap Arrows, and if you've any questions, send an email to hello [at] iarfhlaith dot com.

Bootstrap Arrows currently uses Bootstrap 2.1.1. Built for sharing by Iarfhlaith Kelly