Socket
Book a DemoInstallSign in
Socket

simple_form-theme

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple_form-theme

0.1.4
bundlerRubygems
Version published
Maintainers
1
Created
Source

Gem Version

SimpleForm::Theme

Short description and motivation.

Supported CSS Frameworks

  • Tailwind CSS
  • Bulma

Installation

Add this line to your application's Gemfile:

gem 'simple_form-theme'

And then execute:

bundle

As an alternative instead of adding an additional dependency to your project, you can copy the initializer file to your project from the GitHub repository.

Example:

cp lib/generators/simple_form/theme/templates/config/initializers/simple_form_tailwindcss.rb yourapp/config/initializers/simple_form_tailwindcss.rb

However, if you install the gem, you will get the latest updates and improvements.

Requirements

  • Make sure you have installed simple_form gem.
  • Make sure you have installed the decired css framework.

Usage

Install Tailwind CSS files

bin/rails generate simple_form:theme:tailwind install

After running this generator, you will see the config/initializers/simple_form_tailwindcss.rb file. This file adds the Tailwind CSS styles to your application. Additionally, the config/locales/simple_form_tailwind.en.yml file will add the "required" mark to the required fields. However, you need to communicate Tailwind to "watch" those files by adding the following configuration:

# tailwind.config.js

module.exports = {
  ...
  content: [
    './config/initializers/simple_form_tailwindcss.rb',
    './config/locales/simple_form*.yml',
    ...
  ],
}

Install Bulma CSS files

bin/rails generate simple_form:theme:bulma install

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/JuanVqz/simple_form-theme

License

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

FAQs

Package last updated on 12 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.