Project

rails-fort

0.0
Low commit activity in last 3 years
A long-lived project that still receives updates
Rails-Fort provides a modern, animated progress bar for form completion tracking. It automatically detects form fields and displays visual progress as users fill out forms, with multiple customizable effect types including solid, gradient, sections, flash, and merge animations.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 2.4
~> 13.0
~> 3.12
~> 1.50

Runtime

>= 6.0, < 9.0
 Project Readme

Rails::Fort

CI Gem Version

Modern progress bar for form completion

Requirements

  • Ruby >= 3.0
  • Rails >= 6.0
  • No jQuery required

Installation

Add this line to your application's Gemfile:

gem 'rails-fort', '~> 1.0'

And then execute:

bundle install

Asset Pipeline Setup

For Rails 6.x / 7.x with Sprockets:

In app/assets/javascripts/application.js:

//= require rails_fort

In app/assets/stylesheets/application.css:

*= require fort

For Rails 7+ with Import Maps:

Add to config/importmap.rb:

pin "rails_fort", to: "rails_fort.js"
pin "fort", to: "fort.js"

Import in application.js:

import "rails_fort"

Include fort.css through your stylesheet pipeline or asset host.

Usage

Rails-Fort tracks input, textarea, and select fields inside forms and shows a fixed progress bar as the user completes the form.

Exclude fields

Add ignore or fort-ignore to skip a field:

<input type="text" class="ignore">

Configuration (config/fort.yml)

height: '20px'
duration: '3s'
alignment: 'bottom'
type: 'solid'
value: '#009DFF'

Effects

Solid

type: 'solid'
value: '#009DFF'

Gradient (two colors)

type: 'gradient'
value: ['#009DFF', '#47B9FF']

Sections

type: 'sections'
value: ['#009DFF', '#4AF2A1', '#FB5229']

Flash

type: 'flash'
value: ['#009DFF', '#000', '#6638F0']

Merge

type: 'merge'
value: '#009DFF'

Upgrading

Upgrading from the legacy 0.x gem? See UPGRADE_GUIDE.md for 1.0.0.

JavaScript

The progress bar is implemented in vanilla JavaScript (app/assets/javascripts/fort.js) and vendored inside this gem. The original Fort.js repository by Idris Khenchil is no longer available; this gem maintains a compatible fort.yml API with a new implementation.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ethirajsrinivasan/rails-fort. Contributors are expected to adhere to the Contributor Covenant code of conduct.

Thanks

Thanks to Idris Khenchil for the original Fort.js form progress bar concept.

License

The gem is available as open source under the terms of the MIT License.