Download the PHP package braesident/dropdown without Composer

On this page you can find all versions of the php package braesident/dropdown. 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 dropdown

Dropdown (Bootstrap Extension)

This extension wraps a Bootstrap dropdown into a reusable JavaScript class (Dropdown) and adds:

Purpose and Use Cases

Use this when a plain Bootstrap dropdown is not enough, for example:

Requirements

Quick Start

HTML:

JavaScript:

The selected value is stored in the hidden input with name="countryDropdown".

Initialization: Full Options List

Option Type Default Description
autoselectsingle boolean true Automatically selects the only visible match while typing (false disables this behavior).
bootstrapmajor number 5 Bootstrap major version (5 or 4).
buttonstyle string 'btn-outline-secondary' Extra classes on the toggle button.
caret boolean true Shows/hides the caret on the button (false disables it).
disabled boolean false Disables input, toggle, and hidden input.
floatingbox boolean false Enables Bootstrap floating-label behavior. With Bootstrap 5 and filter: false, the button uses .form-select and keeps the placeholder in the floated label.
items object {} Initial entries. Keys become data-value / hidden-input value.
listjs boolean false Enables List.js mode instead of native menu rendering.
filter boolean true Enables/disables searchable input (false = button label only).
menumaxheight string 'auto' Dynamically uses the available viewport height. Placement prefers below, then above, then a side; 300px is used as the preferred placement height. Set a CSS length such as '300px' for a fixed limit.
menustyle string '' Additional inline style for the menu.
placeholder string '' Placeholder for the search input, the filterless button, or its floated label.
required boolean false Sets required on the search input.
selectionList boolean\|object false Enables an integrated, configurable list for multiple selected items. Passing an object enables it unless enabled: false is set.
swipe.left.hint string\|false false HTML hint for left swipe (for example an icon).
swipe.left.action function\|false false Callback on valid left swipe ((event, li) => {}).
swipe.left.condition function (item) => true Condition to allow left swipe ((idx, item, li) => boolean).
swipe.right.hint string\|false false HTML hint for right swipe.
swipe.right.action function\|false false Callback on valid right swipe ((event, li) => {}).
swipe.right.condition function (item) => true Condition to allow right swipe ((idx, item, li) => boolean).
onSelected function (e) => {} Runs after an item is selected.
onInput function (event, input) => {} Runs while typing/filtering.
onReplaceText function\|undefined undefined Overrides default display-text replacement (click/focusout).
item string '<li>Entry</li>' List.js item template (listjs: true).
valueNames array [] List.js field definitions (listjs: true).
valueKey string\|undefined auto Forces which List.js item field is used as internal key.
bootstrapAutoClose boolean\|undefined undefined Relevant only for Bootstrap 4 fallback; false prevents hide.bs.dropdown.

Item Structure

A single items entry currently supports:

Usage Snippets

1. Set items dynamically

2. Select programmatically

3. Clear selection / input

4. Disable automatic single-match selection

5. Disable/enable dropdown

6. Swipe action on list entries

7. Dispose cleanly (for example before DOM removal)

8. Display multiple selected items inside the dropdown

The list is rendered as .dropdown-selection-list inside the dropdown container and does not need a separate element ID. Its default placement is before the search input. placement: 'after-input' moves it behind the input.

With floatingbox: true, the label remains at the leading edge and stays floated while selected items exist. A customized input placeholder is restored after the last selected item is removed.

The following selectionList properties control data and layout:

Property Type Default Description
enabled boolean true for object configuration Explicitly enables or disables the list.
containerClass string Bootstrap input-group classes Classes for the integrated list container.
itemClass string Bootstrap secondary badge classes Classes for each selected item.
labelClass string 'dropdown-selection-label' Classes for the item label.
removeButtonClass string Bootstrap small button classes Classes for each remove button.
removeButtonText string '×' Default remove-button content.
itemTag string 'span' HTML tag used for each selected item.
placement string 'before-input' Use 'after-input' to place the list after the search input.
valueKey string 'key' Item property used as the stable, unique key.
labelKey string 'label' Item property used as visible text.
titleKey string\|null null Optional item property copied to the title attribute.
getKey function\|null null Custom key resolver: (item, dropdown) => key.
getLabel function\|null null Custom label resolver: (item, dropdown) => label.
renderItem function\|null null Returns text or a DOM node for the label area.
renderRemoveButton function\|null null Returns text or a DOM node for the remove button.
getRemoveButtonAriaLabel string\|function\|null null Accessible remove-button label or resolver.
onRemove function\|null null Runs before removal; returning false cancels it.
onChanged function\|null null Runs after list changes: (items, dropdown) => {}.

Changes also dispatch the bubbling dropdown-selection-list-changed event on the dropdown container.

Important Methods (Short Overview)

Notes


All versions of dropdown with dependencies

PHP Build Version
Package Version
No informations.
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 braesident/dropdown contains the following files

Loading the files please wait ...