All Projects → Johann-S → Bs Custom File Input

Johann-S / Bs Custom File Input

Licence: mit
A little plugin for Bootstrap 4 custom file input

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Bs Custom File Input

Bs Stepper
A stepper for Bootstrap 4.x
Stars: ✭ 261 (+61.11%)
Mutual labels:  bootstrap, bootstrap4, vanilla-js, vanilla-javascript, vanillajs
bs-breakpoints
A plugin which detect Bootstrap 4 breakpoints and emit when there is a change
Stars: ✭ 22 (-86.42%)
Mutual labels:  vanilla-javascript, bootstrap4, vanilla-js, vanillajs
Vanilla Ui Router
Simple vanilla JavaScript router
Stars: ✭ 42 (-74.07%)
Mutual labels:  vanilla-js, vanilla-javascript, vanillajs
tensorflowjs-remove-background
Remove Background from the picture using WebAssembly & TensorFlow.js
Stars: ✭ 79 (-51.23%)
Mutual labels:  vanilla-javascript, vanilla-js, vanillajs
vanillajs-hello
Start a VanillaJS website using WebPack in just 30 seconds: HTML,CSS,Babel,SASS,Bootstrap,Prettier,Gitpod
Stars: ✭ 24 (-85.19%)
Mutual labels:  vanilla-javascript, vanilla-js, vanillajs
Learn Vanilla Js
Open source list of paid & free resources to learn vanilla JavaScript
Stars: ✭ 945 (+483.33%)
Mutual labels:  vanilla-js, vanilla-javascript, vanillajs
Vanillajs Deck
A Vanilla.js Single Page App (SPA) slide deck for a presentation about Vanilla.js written with no frameworks.
Stars: ✭ 119 (-26.54%)
Mutual labels:  vanilla-js, vanilla-javascript, vanillajs
Shards Ui
🎨Shards is a beautiful & modern Bootstrap 4 UI kit packed with extra templates and components.
Stars: ✭ 1,718 (+960.49%)
Mutual labels:  bootstrap, bootstrap4
Tabler React
React components and demo for the Tabler UI theme.
Stars: ✭ 1,830 (+1029.63%)
Mutual labels:  bootstrap, bootstrap4
Architectui Html Theme Free
ArchitectUI Dashboard Free is lightweight and comes packed with the minimal set of components to get you started. If you have a simple application, it’s the perfect solution for you. It’s built on top of Bootstrap 4 and features a scalable architecture just like it’s wiser, older sibling – ArchitectUI HTML Pro theme.
Stars: ✭ 155 (-4.32%)
Mutual labels:  bootstrap, bootstrap4
Bootstrap Blocks Wordpress Plugin
Bootstrap Gutenberg Blocks for WordPress
Stars: ✭ 143 (-11.73%)
Mutual labels:  bootstrap, bootstrap4
Coreui Free Bootstrap Admin Template
CoreUI is free bootstrap admin template
Stars: ✭ 11,038 (+6713.58%)
Mutual labels:  bootstrap, bootstrap4
Cakephp3 Bootstrap Helpers
CakePHP 3.x Helpers for Bootstrap 3 and 4.
Stars: ✭ 134 (-17.28%)
Mutual labels:  bootstrap, bootstrap4
Startbootstrap Creative
Start Bootstrap is an open source library of free Bootstrap themes and templates. All of the free themes and templates on Start Bootstrap are released under the MIT license, which means you can use them for any purpose, even for commercial projects.
Stars: ✭ 1,900 (+1072.84%)
Mutual labels:  bootstrap, bootstrap4
React Redux Bootstrap Webpack Starter
React 16.9 + Typescript + React-Router 4 + Redux + Bootstrap 4 + Hot Reload + redux-devtools-extension + Webpack 4 + styled-components STARTER
Stars: ✭ 133 (-17.9%)
Mutual labels:  bootstrap, bootstrap4
Startbootstrap Agency
Start Bootstrap is an open source library of free Bootstrap themes and templates. All of the free themes and templates on Start Bootstrap are released under the MIT license, which means you can use them for any purpose, even for commercial projects.
Stars: ✭ 1,810 (+1017.28%)
Mutual labels:  bootstrap, bootstrap4
Bootstrap4 Website
Website built with bootstrap 4 Framework
Stars: ✭ 124 (-23.46%)
Mutual labels:  bootstrap, bootstrap4
Bootstrap4
Repository for my tutorial course: Bootstrap 4 Essential Training on LinkedIn Learning and Lynda.com.
Stars: ✭ 142 (-12.35%)
Mutual labels:  bootstrap, bootstrap4
Startbootstrap Clean Blog Jekyll
Start Bootstrap is an open source library of free Bootstrap templates and themes. All of the free templates and themes on Start Bootstrap are released under the MIT license, which means you can use them for any purpose, even for commercial projects.
Stars: ✭ 1,837 (+1033.95%)
Mutual labels:  bootstrap, bootstrap4
Datepickk
Simple, beautiful and powerful datepicker!
Stars: ✭ 160 (-1.23%)
Mutual labels:  vanilla-javascript, vanillajs

bs-custom-file-input

npm version dependencies Status devDependencies Status Build Status Coverage Status JS gzip size BrowserStack Status

A little plugin which makes Bootstrap 4 custom file input dynamic with no dependencies.

You can use it on React and Angular too because this plugin is written with the most used JavaScript framework: VanillaJS.

Demo

Features:

  • Works with Bootstrap 4
  • Works without dependencies and jQuery
  • Display file name
  • Display file names for multiple input
  • Reset your custom file input to its initial state
  • Handle form reset
  • Allow custom selectors for input, and form
  • Allow to drag and drop files
  • Allow you to change the default display with a child in the <label> element
  • Built in UMD to be used everywhere
  • Small, only 2kb and less if you gzip it

Table of contents

Install

With npm

npm install bs-custom-file-input --save

CDN

CDN Link
jsDelivr https://cdn.jsdelivr.net/npm/bs-custom-file-input/dist/bs-custom-file-input.js
jsDelivr, minified https://cdn.jsdelivr.net/npm/bs-custom-file-input/dist/bs-custom-file-input.min.js

How to use it

You should wait for the document ready event and call the init method to make your custom file input dynamic. We expose one global variable available everywhere: bsCustomFileInput

$(document).ready(function () {
  bsCustomFileInput.init()
})

Use it with npm

import bsCustomFileInput from 'bs-custom-file-input'

For more examples check out this file.

This library is UMD ready so you can use it everywhere.

Methods

init

Finds your Bootstrap custom file input and will make them dynamic.

Parameters

  • inputSelector

    • default value: .custom-file input[type="file"]
    • type: string

    You can pass a custom input selector, but be sure to pass a file input selector

  • formSelector

    • default value: form
    • type: string

    Allows you to pass a custom form selector, but be sure to pass a form selector

destroy

Removes this plugin from your Bootstrap custom file input and restore them at their first initial state

Compatibility

bsCustomFileInput is compatible with:

  • IE10+
  • Edge
  • Firefox
  • Chrome
  • Safari
  • Chrome Android
  • Safari iOS

You can find our BrowserStack list of browsers here.

Support me

If you want to thank me, you can support me and become my Patron

Thanks

BrowserStack Logo

Thanks to BrowserStack for providing the infrastructure that allows us to test in real browsers!

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].