Railsboot
Railsboot is an implementation of the famous Bootstrap CSS framework using Rails View Components.
Preview
You'll find detailed information on how to use Railsboot on https://railsbootui.com
Installation
Add railsboot
to your Gemfile and run bundle install
:
bundle add railsboot && bundle install
Also make ensure that you have correctly setup bootstrap in your Rails app. Otherwise the bootstrap styles and js files will not work.
Usage
Each view component can be rendered with either a standard component call
<%= render Railsboot::BadgeComponent.new { "My badge"} %>
or with the integrated component helper
<%= railsboot_badge { "My badge"} %>
Configuration
Several view components ensure a valid bootstrap theme color scheme, so if you tweaked or enhanced the standard bootstrap volor palette, you should also add this to the gem. Create an initializer (in config/initializers/railsboot.rb
):
Railsboot.colors = ["primary", "secondary", "my-color"]
Development
Download the source code and run
bundle install
for instaling the dev dependenciesbundle exec rake test
for running the test
License
The gem is available as open source under the terms of the MIT License.