Download the PHP package drago-ex/component without Composer

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

Drago Components

Bootstrap components such as modal, offcanvas, dropdown, and tabs.

License: MIT PHP version Tests Coding Style

Requirements

Installation

Project files

File copying is handled automatically by drago-ex/project-tools, which must be installed in your project. Without it, copy the files manually according to the copy section in this package's composer.json. To skip this package, set "skip": true under extra.drago-tools.packages.<package-name> in your root composer.json.

Modal and offcanvas

In the Control component, use the Drago\Component\Component trait.

Passing variables to the template:

You can then implement the Drago\Component\ModalHandle and Drago\Component\OffcanvasHandle interfaces. The optional argument of modalComponent() and offCanvasComponent() is the name of a snippet to redraw; here it is the modal and offcanvas snippets from the templates below:

Attributes on interface methods are not inherited, so repeat #[Requires(ajax: true)] in your implementation. You can also write your own signal handler and redraw the related snippets manually.

Use the component templates in Latte. If you need to redraw multiple blocks, add additional snippets inside the embedded template.

JavaScript setup

Since the package is installed via Composer, add the following to your package.json to make the drago-component alias available in your bundler:

Then run npm install.

Dropdown widget

The dropdown widget is a small Latte wrapper for Bootstrap dropdown menus. It is useful for compact navigation actions, language switchers, user menus, or theme controls.

Register the dropdown helper in your frontend entry point:

Use the widget in Latte:

Available parameters:

The menu value is appended to the Bootstrap dropdown-menu-* class, so menu: 'end' renders dropdown-menu-end and menu: 'lg-start' renders dropdown-menu-lg-start.

The widget keeps dropdown behavior on Bootstrap.

For custom colors, prefer Bootstrap utilities and variables on your own layout instead of overriding the dropdown widget.

The widget provides helper blocks:

Tabs widget

The tabs widget renders Bootstrap tabs from a small configuration array and keeps the content blocks in the same template. Bootstrap tab JavaScript must be available in the project.

Each tab item supports:

Widget parameters:


All versions of component with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3 <9
nette/application Version ^3.2
latte/latte Version ^3.1
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 drago-ex/component contains the following files

Loading the files please wait ...