jacerider / neo_modal
Provides modal API for elements and fields.
Installs: 106
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:drupal-module
Requires
- drupal/core: ^10.3
- jacerider/neo: ^1
- jacerider/neo_settings: ^1
- jacerider/neo_tooltip: ^1
README
- Introduction
- Requirements
- Installation
- Twig
INTRODUCTION
Provides modal API for elements and fields.
REQUIREMENTS
This module requires no modules outside of Drupal core.
INSTALLATION
Install as you would normally install a contributed Drupal module. Visit https://www.drupal.org/node/1897420 for further information.
TWIG
A twig helper has been provided that will convert a render element into a modal. The "breakpoint" setting will automatically set the conversion point of the modal.
In this example, the first param is the trigger title. The second is the modal options (because we set the breakpoint to 'md', the modal will only be used when the screen size is below the medium breakpoint). The third is the preset. The fourth is the attributes that will be applied to the trigger.
{{ form|neo_modal('Filter By'|t, {title: 'Filter Products', breakpoint: 'md'}, 'neo_modal_shelf_left', {class: ['btn btn-outline bg-base-0 w-full text-center']}) }}