TippyRails
This is the Ruby extension for the Tippy JS tooltipping library, allowing you to easily use it in any Rails or Sprockets backed project.
Installation
Add this line to your application's Gemfile:
gem 'tippy_rails', '~> 1.2'
or
gem 'tippy_rails', '~> 2.5'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install tippy_rails
Usage
To begin, you'll need to include the gem in your application.js
file, after JQuery, like so:
\\= require jquery
\\= require tippy
\\= require tree .
Additionally you can include CSS files by adding the following to application.css
or application.scss
(respectively):
*= require tippy
OR
@import 'tippy';
Now you're all set up and ready to go, additional usage instructions can be found on the Tippy.js Website.
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Contributing
Given this gem is just a wrapper around the Tippy.js Library, if you would like to use a version that is not supported please follow these steps:
- Clone Repo
- Find condensed, unminified JS and CSS assets for the Tippy version you want (This tends to be a good resource for exactly that)
- Replace the code in vendor/assets with the relevant code
- Bump version and make your PR
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the TippyRails project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.