https://github.com/komposable/klassnames
Helper to simplify conditional CSS classes in Ruby on Rails views.
https://github.com/komposable/klassnames
actionview css helpers rails
Last synced: 10 months ago
JSON representation
Helper to simplify conditional CSS classes in Ruby on Rails views.
- Host: GitHub
- URL: https://github.com/komposable/klassnames
- Owner: komposable
- License: mit
- Created: 2017-12-18T13:17:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-19T22:50:55.000Z (over 8 years ago)
- Last Synced: 2025-04-26T15:02:19.992Z (about 1 year ago)
- Topics: actionview, css, helpers, rails
- Language: Ruby
- Homepage:
- Size: 15.6 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Klassnames
[](https://travis-ci.org/komposable/klassnames)
View helper to simplify conditional class in view.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'klassnames'
```
## Usage
```
div(class=classnames("one", "two", three: true))
=>
```
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).