Juergen Posted 6 hours ago Posted 6 hours ago Hi everyone, I have just released **SwiperSlider**, a slider field for ProcessWire based on Swiper. Everything is built into one Fieldtype/Inputfield pair, so slides are edited right in the page editor. Download on GitHub: https://github.com/juergenweb/SwiperSlider Download from module directory: https://processwire.com/modules/swiper-slider/ ### What it does - Live preview in the admin: place text blocks, buttons, icons and images freely on a slide by dragging them, with a separate layout for mobile screens. Undo/redo and keyboard control are included. - Multilingual texts and buttons per slide. - Responsive images: `srcset` with fixed width steps, optional WebP, SVG and GIF are supported. The smaller versions are created from the original on the first page view, so images that were uploaded earlier get them too. - Crop frames for the visible section of an image, per button colors, text effects. - Checklist per slide in the editor (for example missing alt text or low contrast of text on the image). - Sanitized output: the rich text, links, classes and colors are cleaned on input and again on output. - Accessible markup, checked with axe-core. - Admin texts in English and German. ### Usage 1. Copy the folder to `/site/modules/SwiperSlider/`, then go to Modules > Refresh and install "Swiper Slider". It installs the Fieldtype and the Inputfield. 2. Create a field of the type "Swiper Slider" and add it to a template. 3. Output it in your template: `echo $page->slider->render();` The CSS and JS of Swiper are included automatically (you can turn this off and load the assets yourself). ### Requirements ProcessWire 3.0.200 or newer, PHP 8.1 or newer. ### Tests The module comes with a test suite (PHPUnit, Vitest, Playwright, including tests of the HTML sanitizer and of the admin preview). A GitHub workflow runs the checks that need no ProcessWire installation on PHP 8.1 to 8.5. This is the first public release, so I am very interested in your feedback, bug reports and ideas. Please open an issue on GitHub or answer here. Thanks for reading! 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now