https://github.com/tarellel/simple_form-tailwind
A basic rails generator for adding a simpleform config for tailwindCSS based forms
https://github.com/tarellel/simple_form-tailwind
generator rails simpleform tailwind
Last synced: 7 months ago
JSON representation
A basic rails generator for adding a simpleform config for tailwindCSS based forms
- Host: GitHub
- URL: https://github.com/tarellel/simple_form-tailwind
- Owner: tarellel
- License: mit
- Created: 2020-11-29T01:16:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-05-09T23:13:05.000Z (about 1 year ago)
- Last Synced: 2025-10-09T22:12:55.318Z (8 months ago)
- Topics: generator, rails, simpleform, tailwind
- Language: Ruby
- Homepage:
- Size: 43.9 KB
- Stars: 84
- Watchers: 1
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# SimpleForm::Tailwind
Used to add a base [simple_form](https://github.com/heartcombo/simple_form) configuration with Tailwind CSS classes for form attributes.
**NOTE:** This simple_form configuration is optimized for Rails 7> and Tailwind CSS 4.
## Prerequisites
Before installing this gem, make sure you have installed Tailwind CSS in your Rails application:
```bash
./bin/bundle add tailwindcss-ruby
./bin/bundle add tailwindcss-rails
./bin/rails tailwindcss:install
```
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'simple_form-tailwind'
```
Then execute:
$ bundle install
Or install it yourself as:
$ gem install simple_form-tailwind
## Usage
To use this simple_form configuration, you need to ensure that your application uses simple_form to generate its forms.
Run the generator to add the following file to your application `config/initializers/simple_form_tailwind.rb`:
$ rails g simple_form:tailwind:install
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/tarellel/simple_form-tailwind.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).