Download the PHP package blobfolio/blob-select without Composer

On this page you can find all versions of the php package blobfolio/blob-select. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package blob-select

blob-select

A dependency-free Javascript plugin for styling <select> elements with an emphasis on markup simplicity and performance.

Note: For projects built with the Vue.js framework, the vue-blob-select fork might be a better fit.

Table of Contents
  1. Features
  2. Requirements
  3. Use
    • Installation
    • Configuration
    • Initialization
    • Destruction
    • Repaint
  4. Styling
  5. License

 

Features

blob-select has feature parity with the standard <select>, <option>, and <optgroup> attributes, including:

blob-select additionally provides support for:

 

Requirements

blob-select is written in pure Javascript and does not depend on any third-party frameworks.

It is compatible with all major modern web browsers, and the browser that just won't die IE 11.

This plugin does make use of some ES6 markup like let and const. If your project needs to support old browsers, you will need to first transpile blobselect.min.js to ES5 with a tool like Babel, then serve that copy to visitors.

 

Use

Installation

Download dist/blobselect.min.js and add it to your project folder, and include it somewhere on the page.

Aside from the main script, you'll also need some CSS styles. You can either plug in the default stylesheet from dist/css/ or take a look at the source in src/scss/ to roll your own.

Configuration

blob-select includes a few choice functional enhancements to the standard select browser object, but does not attempt to introduce every feature ever dreamt of by (wo)man or beast. These settings can be defined for each element in either of three ways:

The following settings are available:

Type Key Default Description
string orderType "" How to compare option labels for sorting; either "string", "numeric", or empty to not sort.
string order "asc" Sort order (if orderType is specified); "asc" or "desc".
string placeholder "---" Selected text to display when a "placeholder" <option> is selected. Placeholderness is TRUE when an <option> has no label or has an attribute data-placeholder="1".
string placeholderOption "---" Same as above, except this text is used only for the dropdown listing. If omitted, the placeholder setting will supply both.
bool search FALSE Whether or not to display a simple search field in the dropdown. The search field itself is a contentEditable <div> so as not to screw up your real <form>.
int watch 0 This forces blob-select to re-check for changes to its element every X milliseconds. This option is useful when other scripts might manipulate the element without firing a change event. Otherwise, leave this disabled to spare the unnecessary overhead.

Initialization

blob-select will automatically initialize any <select> elements on DOMContentLoaded that contain a data-blobselect* attribute. Alternatively, you can manually initialize an element at any time as follows:

Destruction

To restore your page to its natural state, simply run:

Repaint

blob-select will automatically listen for change events, but some Javascript frameworks might write changes without firing an event. There are two workarounds for this:

watch:

Set the watch runtime property on the field. This will add a setInterval() trigger to the mix, rechecking the DOM every X millseconds for changes (and rebuilding as necessary).

element.blobSelect.buildData():

Call the .buildData() method after such changes have landed.

 

Styling

blob-select aims to be as headache-free as possible. Its markup is minimal (see below) and it does not impose pesky inline styles, Javascript animations, or convoluted nested>nested>nested elements. Frontend developers are free to define everything through elegant CSS wizardry.

The HTML structure is as follows:

The SCSS source folder includes example styles that should provide a starting point and/or inspiration. :)

 

License

Copyright © 2018 Blobfolio, LLC <[email protected]>

This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <[email protected]>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.

Donations

Bitcoin QR If you have found this work useful and would like to contribute financially, Bitcoin tips are always welcome!

1Af56Nxauv8M1ChyQxtBe1yvdp2jtaB1GF

All versions of blob-select with dependencies

PHP Build Version
Package Version
Requires robloach/component-installer Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package blobfolio/blob-select contains the following files

Loading the files please wait ....