Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

switchbox

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

switchbox

  • 1.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Switchbox

An awesome plugin that extends Rails FormBuilder making the boolean fields looks like an awesome animated switch. It's switchable, It's draggable, It's switchbox.

Installation

Add this line to your application's Gemfile:

gem 'switchbox'

And then execute:

$ bundle

Or install it yourself as:

$ gem install switchbox

Add this to application.js

//= require switch_rails

And add this to application.css

*= require switch_rails

Usage

Instead of:

<%= f.check_box :boolean_field %>

Use:

<%= f.switch_box :boolean_field %>

##customization

To override your switch use:

outterSwitch' class to modify the outer container

'innerSwitch class to modify the inner switch

The first div with 'content' class will be the left option, and the seccond will be the right option.

#known bugs

You cannot edit the width of the switch yet or the texts inside the 'content' divs. Ill release this fix really soon.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 08 May 2014

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc