Labels and Badges

<%= link_to('Bootstrap Documentation', 'http://twitter.github.io/bootstrap/components.html#labels-badges') %>

Labels (Stamps)

<%= link_to('API Documentation', 'http://rubydoc.info/gems/bootstrap-view-helpers/Bootstrap/StampHelper') %>

We use stamp because label is a Rails Helper method.

Label Code
<%= stamp('Default') %> stamp('Default')
<%= stamp('Success', :success) %> stamp('Success', :success)
<%= stamp('Warning', :warning) %> stamp('Warning', :warning)
<%= stamp('Danger', :danger) %> stamp('Danger', :danger)
<%= stamp('Info', :info) %> stamp('Info', :info)
<%= stamp('Primary', :primary) %> stamp('Primary', :primary)
Options stamp('Success', :success, id: 'success-label', key: 'value')

Badges

<%= link_to('API Documentation', 'http://rubydoc.info/gems/bootstrap-view-helpers/Bootstrap/BadgeHelper') %>

Badge Code
<%= badge('1') %> badge('1')
<%= badge('2', :success) %> badge('2', :success)
<%= badge('3', :warning) %> badge('3', :warning)
<%= badge('4', :danger) %> badge('4', :danger)
<%= badge('5', :info) %> badge('5', :info)
<%= badge('10', :primary) %> badge('10', :primary)
Options badge('Success', :success, id: 'success-badge', key: 'value')