This package has been deprecated

Author message:

Moved to style-file-input

kist-stylefileinput

0.1.6 • Public • Published

kist-stylefileinput

Style file input elements. Heavily based on Filament Group’s jQuery Custom File Input.

Installation

npm install kist-stylefileinput --save
 
bower install kist-stylefileinput --save

Basic styling for file input is provided with CSS.

API

$Element.stylefileinput(options)

options

Type: Object|String

Options defined as Object
labels

Type: Object

Labels for elements.

Default value:

{
    buttonBrowse: 'Browse',
    buttonChange: 'Change',
    val: 'No file selected'
}
classes

Type: Object

Classes for elements.

Default value:

{
    wrapper: 'kist-Stylefileinput',
    input: 'kist-Stylefileinput-input',
    button: 'kist-Stylefileinput-button',
    text: 'kist-Stylefileinput-text'
}
Options defined as String
destroy

Destroy plugin instance.

Examples

<input type="file" />
$('input').stylefileinput();

Caveats

  • Opera Mini doesn’t fire change event when input value is changed so it won’re replace default text.

Browser support

Tested in IE8+ and all modern browsers.

License

MIT © Ivan Nikolić
MIT © Filament Group

Package Sidebar

Install

npm i kist-stylefileinput

Weekly Downloads

1

Version

0.1.6

License

MIT

Last publish

Collaborators

  • niksy