--- layout: default title: Components slug: components lead: "Over a dozen reusable components built to provide Leap users with a decent web browsing experience" base_url: "../" ---

Toggleable, contextual menu for displaying lists of links. Made interactive with the dropdown JavaScript plugin.

Wrap the dropdown's trigger and the dropdown menu within .dropdown, or another element that declares position: relative;. Then add the menu's HTML. Make the button and the menu item anchor links .leap-interactive.

{% highlight html %} {% endhighlight %}

Button Groups

Wrap a series of buttons with .btn in .btn-group. Make all buttons have the class leap-interactive.

{% highlight html %}
{% endhighlight %}

Extend Leapstrap's grid system with the thumbnail component to easily display grids of images, videos, text, and more.

Default example

By default, Leapstrap's thumbnails are designed to showcase linked images with minimal required markup. Add CSS class leap-interactive and you'll get a border.

{% highlight html %}
...
{% endhighlight %}

HTML content

With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.

Generic placeholder thumbnail

Thumbnail label

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

Button Button

Generic placeholder thumbnail

Thumbnail label

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

Button Button

Generic placeholder thumbnail

Thumbnail label

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

Button Button

{% highlight html %}
...

Thumbnail label

...

Button Button

{% endhighlight %}

Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.

Default media

The default media allow to float a media object (images, video, audio) to the left or right of a content block. Add CSS classes media-leap leap-interactive to get a border on hover.

Generic placeholder image

Media heading

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Generic placeholder image

Media heading

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Generic placeholder image

Media heading

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
{% highlight html %}
...

Media heading

...
{% endhighlight %}

Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the alerts jQuery plugin.

Examples

Wrap any text and an optional dismiss button in .alert and one of the four contextual classes (e.g., .alert-success) for basic alert messages.

No default class

Alerts don't have default classes, only base and modifier classes. A default gray alert doesn't make too much sense, so you're required to specify a type via contextual class. Choose from success, info, warning, or danger.

Dismissable alerts

Build on any alert by adding an optional .alert-dismissable and close button.

Warning! Best check yo self, you're not looking too good.
{% highlight html %}
Warning! Best check yo self, you're not looking too good.
{% endhighlight %}

Ensure proper behavior across all devices

Be sure to use the <button> element with the data-dismiss="alert" data attribute.

Use the .alert-link utility class to quickly provide matching colored links within any alert.

Well done! You successfully read this important alert message.
Heads up! This alert needs your attention, but it's not super important.
Warning! Best check yo self, you're not looking too good.
Oh snap! Change a few things up and try submitting again.
{% highlight html %}
...
...
...
...
{% endhighlight %}

While not always necessary, sometimes you need to put your DOM in a box. For those situations, try the panel component.

Leap Panel example

Hovering over a leap-panel gives a basic border outline effect.

Leap panel example (hover over me)
{% highlight html %}
Leap panel example (hover over me)
{% endhighlight %}

Panel options

Easily add a heading container to your panel with .panel-heading. You may also include any <h1>-<h6> with a .panel-title class to add a pre-styled heading.

Wrap buttons or secondary text in .panel-footer. Note that panel footers do not inherit colors and borders when using contextual variations as they are not meant to be in the foreground.

Panel heading without title
Panel content

Panel title

Panel content
Panel content
{% highlight html %}
Panel heading without title
Panel content

Panel title

Panel content
Panel content
{% endhighlight %}

Contextual alternatives

Like other components, easily make a panel more meaningful to a particular context by adding any of the contextual state classes.

Panel title

Panel content

Panel title

Panel content

Panel title

Panel content

Panel title

Panel content

Panel title

Panel content
{% highlight html %}
...
...
...
...
...
{% endhighlight %}

Leap well

Use the Leap well as a simple effect on an element to give it a general hover effect.

Hover over me, I'm in a well!
{% highlight html %}
...
{% endhighlight %}

Example

Example heading New

{% highlight html %}

Example heading New

{% endhighlight %}

Available variations

Add any of the below mentioned modifier classes to change the appearance of a label.

Default Primary Success Info Warning Danger
{% highlight html %} Default Primary Success Info Warning Danger {% endhighlight %}

Easily highlight new or unread items by adding a <span class="badge"> to links, Leapstrap navs, and more.

Inbox 42
{% highlight html %} Inbox 42 {% endhighlight %}

Self collapsing

When there are no new or unread items, badges will simply collapse (via CSS's :empty selector) provided no content exists within.

Cross-browser compatibility

Badges won't self collapse in Internet Explorer 8 because it lacks support for the :empty selector.