Provides view helpers for accordion, tabs and modal Twitter Bootstrap components.
In your Gemfile:
gem 'bootstrap-components-helpers'
= accordion do |accordion|
= accordion.pane 'My first pane' do
= render partial: 'my_first_pane'
= accordion.pane 'My second pane' do
= render partial: 'my_second_pane'
accordion method options :
:accordion_id: when you want more than one accordion on the same page.:class: to add an additional CSS class to the container DIV.
pane method options :
:open: when you want that pane to be open on load.
= tabs do |tabs|
- tabs.pane 'My first pane' do
= render partial: 'my_first_pane'
- tabs.pane 'My second pane' do
= render partial: 'my_second_pane'
tabs method options :
:style:tabsorpills(default istabs).
pane method options :
:active: when you want that pane to be active on load.
= modal 'My modal title' do |modal|
- modal.body do
Inside the modal
modal method options :
:skip_footer: when you don't want a footer at all for your modal.
- Graham Torn
- Caleb Adam Haye
- Darkside73
- Dave Burt