# CMB2 Switch Button Field Type
### Switch field type for CMB2. Ready to use with a theme

## Use
`switch` as a field type.

```php
array(
	    'name'        => __('Switch Field', 'cmb2'),
	    'id'	  => $prefix . 'switch_field_id',
	    'desc'        => __('Switch Field Description.','cmb2'),	    
		  'type'    => 'switch',
		  'default'    => 0,
		  'label'    => array('on'=> 'Yes', 'off'=> 'No') //default On, Off
  )
  
```
## Screenshots
<img src="https://github.com/imraviroy/CMB2-Switch-Button-Metafield/blob/master/CMB2-switch-Button.jpg" alt="Image" style="max-width:100%;">

## Tutorial on how to integrate Switch Button field in to a WordPress theme 
http://www.proy.info/how-to-create-cmb2-switch-field/
