Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

Element Pack

No security coverage
View on drupal.org

The Element Pack module offers a collection of custom elements designed to enhance the user experience, improve accessibility, and enable more sophisticated designs in Drupal. By providing a library of flexible and modern components, this module helps developers and site builders create interfaces that are both visually appealing and machine-readable.

Table of contents

Summary

Key features of the module include a reimagined approach to Drupal’s core button element. Unlike the default implementation, which uses </code> tags for buttons, the Element Pack module leverages the semantic and flexible <code> tag. This enables developers to include richer content, such as icons or HTML, directly within buttons, aligning with modern web design practices.

The module prioritizes:

  • User Experience (UX): Provides customizable elements to create seamless interactions.
  • Accessibility: Ensures components are machine-readable and follow best practices for inclusive design.
  • Design Flexibility: Supports advanced styling options and dynamic content for a polished appearance.

With Element Pack, your Drupal forms and layouts can take a significant step forward, offering both functional and aesthetic improvements across a wide range of use cases. Whether you’re building intuitive forms, dynamic layouts, or simply want more control over UI components, Element Pack has the tools you need to succeed.

Requirements

This module requires the following:

  • Drupal Core: ^10 or ^11

No additional dependencies are required.

Installation

Install this module as you would normally install a contributed Drupal module. Follow these steps:

1. Download the module:

composer require drupal/element_pack

2. Enable the module:

drush en element_pack

3. Clear the cache:

drush cr

For more detailed information, refer to the Installing Drupal Modules documentation.

Configuration

  1. After enabling the module, you can use the custom_button form element in your Drupal forms.
  2. Example usage in a form:
$form['my_button'] = [
  '#type' => 'element_pack_button',
  '#label' => Markup::create('Click Me'),
  '#attributes' => [
    'class' => ['my-button'],
    'onclick' => 'alert("Button clicked!");',
    'type' => 'button', // Or 'submit'.
  ],
];

Maintainers

If you would like to contribute to the development of this module, please feel free to submit issues and patches on the Element Pack module’s issue queue.

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
3
Tracked since
Dec 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 3
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
1.0.1 Stable Dec 2, 2024
1.0.0 Stable Dec 2, 2024
1.0.x-dev Dev Dec 2, 2024