# rt-upload-buttons

> Pretty file upload buttons

Latest version **0.0.1** (published 2017-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install rt-upload-buttons
pnpm add rt-upload-buttons
yarn add rt-upload-buttons
bun add rt-upload-buttons
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-06-09 |
| First published | 2016-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Matt Emrick |
| Maintainers | rtmatt |

## Links

- npm: https://www.npmjs.com/package/rt-upload-buttons
- Repository: https://github.com/rtmatt/rt-upload-buttons
- Homepage: https://github.com/rtmatt/rt-upload-buttons#readme
- Issues: https://github.com/rtmatt/rt-upload-buttons/issues
- npm.io page: https://npm.io/package/rt-upload-buttons

## Recent versions

- 0.0.1 (latest) — 2017-06-09
- 0.0.0 — 2016-02-13

## README

# rt-upload-buttons
Pretty file upload buttons

### Dependencies
* jQuery
* SASS build process

## Installation



### Pull In Source

``` bash 

$ npm install rt-upload-buttons

```



### Include Script in Gulp Build
in gulpfile:


``` javascript 

 mix.scripts([
       // [...] 
         './node_modules/rt-upload-buttons/dist/rt-upload-buttons.min.js',
       // [...] 
    ],[dest file]);

```



   
  

 ## Usage
 Simply include the following in your sites app scripts:
 
 ``` JavaScript 
 
 jQuery(document).ready(function(){
     new RTButtons();     
 });
 
 
 ```
 
 By default, your form must reflect at least the following:
 1. A Form with class "rt-form"
 2. A input with type of "file" wrapped in an element with a class of "file-upload"
 
 ``` html 
 
 <form class="rt-form">
     <div class="file-upload">
         <input name="image" type="file">
     </div>
 </form>
 
 ```
 
 ### Note
 By default, this will replace the native input with a ``` <button class="btn btn-info"> ``` element.
 
 
 ## Configuration
The above mentioned requirements can be overridden by changing any of the default options upon instantiation:

  ``` html 
  
  <form class="your-form-class">
      <div class="your-input-wrapper">
          <input name="image" type="file">
      </div>
  </form>
  
  ```
  
  
  ``` JavaScript 
  
  new RTButtons({
  	classes:'custom-button-class' //any class names for the rendered button go here
  	form_selector:'.your-form-class',  //jQuery selector if you want to use a different form class
  	upload_group_selector: '.your-input-wrapper'  //jQuery selector if you want to change the input wrapper class
  });
  
  ```
  
  
  
 
 
 
 ``` javascript 
 
	$('#form_group_description').rtcharcount({
		min:0,
		max:170
	});
 
 ```

---
_Source: https://npm.io/package/rt-upload-buttons · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
