Download the PHP package blackbird/hyva-splide-js without Composer

On this page you can find all versions of the php package blackbird/hyva-splide-js. 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 hyva-splide-js

# hyva-splide-js [![Latest Stable Version](https://img.shields.io/badge/version-2.0.1-blue)](https://packagist.org/packages/blackbird/hyva-splide-js) [![SplideJS Version](https://img.shields.io/badge/splidejs-4.1.3-purple)](https://github.com/Splidejs/splide/releases/tag/v4.1.3) [![License: MIT](https://img.shields.io/github/license/blackbird-agency/hyva-splide-js.svg)](./LICENSE) An implementation of [SplideJS library](https://splidejs.com/) in [Hyvä Theme for Magento 2](https://www.hyva.io/hyva-themes-license.html) You no longer need to worry about how to implement SplideJS in your Magento 2 Hyvä Theme projects.
No manipulations required, instant use after installation. Splide is lazily loaded and does not affect performances accoding to [Hyvä documentation](https://docs.hyva.io/hyva-themes/writing-code/patterns/loading-external-javascript.html). [How It Works](#how-it-works) • [Installation](#installation) • [Usage](#usage) • [More modules](#more-modules)

How It Works

The module simply loads SplideJS on all pages with at least one element in the DOM bearing the CSS class splide
(the class required by SplideJS).

When the library has been loaded on the page, a state stored in the Alpine.store is updated, indicating that SplideJS is ready for use.

The state can also be used to force the library to be loaded at any time, here is an example using forceLoad()

Installation

Requirements

In production mode, do not forget to recompile and redeploy the static resources.

Usage

Once the module has been installed, simply add the HTML code required to create a slider, as described in the SplideJS documentation

Next, create a function to listen the Alpine.store state is_loading indicating that SplideJS has been loaded, and apply Splide to the HTML elements, as described in the SplideJS documentation.

You can specify any of the SplideJS options as shown here

Finally, set up the x-data directive and do not forget to call the previous function in an x-effect, to prevent Splide being applied until the library is loaded, and to allow it to be automatically applied when the library is loaded.

Full example

You can specify any of the SplideJS options as shown here

Example : usage of forceLoad()

Imagine the following case: you do not have an element with the default splide class in your DOM, and you want to add a slider using SplideJS when a user's action is triggered.

In this case, Splide won't be loaded by default on the page, you will have to explicitly request that Splide be loaded.

or

To find out exactly which one to use, please see the official Alpine documentation for $store or for Alpine.store.

This will force the library to load on the page, even if no element has the splide class. You can then follow the classic Usage procedure to apply Splide.

More modules

hyva-photo-swipe : An implementation of PhotoSwipe library in Hyvä Theme for Magento 2, full-screen gallery sliders, zoomable and highly customizable.


All versions of hyva-splide-js with dependencies

PHP Build Version
Package 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 blackbird/hyva-splide-js contains the following files

Loading the files please wait ....