Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Alpine.js

No security coverage
View on drupal.org

Alpine.js offers you the reactive and declarative nature of big frameworks like Vue or React at a much lower cost.

You get to keep your DOM, and sprinkle in behavior as you see fit.

This module provides the Alpine.js library for any modules and themes that require it.

The library is installed from CDN, uses the module/nomodule pattern to ensure IE11 and legacy browser support and is also pinned to a specific version number (currently v2.5.0) to avoid unexpected breakage from newer versions.

Usage

1. Install this module as you would install any other Drupal module.

2. Your module or theme should declare Alpine.js module as a dependency:

dependencies:
  - alpinejs

Example: my_awesome_theme.info.yml

name: My Awesome Theme
type: theme
core: 8.x
dependencies:
  - alpinejs

You should also define the dependency in the composer.json file. See https://www.drupal.org/docs/creating-custom-modules/add-a-composerjson-file for more details on how to do that.

3. Include the library (alpinejs/alpine) as a dependency to your module or theme library:

  dependencies:
    - alpinejs/alpine

Example: my_awesome_theme.libraries.yml:

global-scripts:
  version: 1.0
  js:
    dist/index.js: { preprocess: false, minified: true }
  dependencies:
    - core/drupal
    - alpinejs/alpine

Alternatively, you can also attach the library directly in a Twig file:

{{ attach_library('alpinejs/alpine') }}

Versioning

The module versioning is intended to match semantically with Alpine.js versioning.

Alpine.js Drupal module version Alpine.js version 1.0.0 2.4.1 1.1.0 2.5.0 1.2.0 2.6.0 1.4.0 (current) 2.8.0

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Apr 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
1.4.x-dev Dev Apr 17, 2023