Download the PHP package nowo-tech/slide-to-confirm-bundle without Composer
On this page you can find all versions of the php package nowo-tech/slide-to-confirm-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nowo-tech/slide-to-confirm-bundle
More information about nowo-tech/slide-to-confirm-bundle
Files in nowo-tech/slide-to-confirm-bundle
Package slide-to-confirm-bundle
Short Description Symfony FormType for slide-to-confirm / swipe-to-submit actions (payments, deletions, legal consent, and other irreversible submits).
License MIT
Homepage https://github.com/nowo-tech/SlideToConfirmBundle
Informations about the package slide-to-confirm-bundle
Slide To Confirm Bundle
⭐ Found this useful? Give it a star on GitHub so more developers can find it.
Symfony FormType for slide-to-confirm / swipe-to-submit — a submit control that must be dragged to the end of a track before the form is posted. Same family as PhoneInput, PasswordToggle, and SelectAllChoice: a drop-in field type, Twig themes, Stimulus or a standalone script. For Symfony 6, 7 and 8 · PHP 8.2+.
This bundle is FrankenPHP worker mode friendly.
Table of contents
- Quick search terms
- Features
- Installation
- Requirements
- Configuration
- Usage
- Use cases
- Demo
- Development
- Documentation
- Tests and coverage
- License
- Author
Quick search terms
Looking for Symfony slide to confirm, swipe to submit form type, slide to pay Symfony, slide to delete account, iOS slide to unlock form, Stimulus swipe submit, SlideToConfirmType, SwipeToSubmitType? You're in the right place.
Features
- ✅
SlideToConfirmType— checkbox-backed slider; completing the swipe confirms and optionally submits - ✅
SwipeToSubmitType— semantic alias for “this field is the submit” - ✅ Named profiles —
default,payment,danger,legal,publish,gate(REQ-CFG-001) - ✅ Use cases — payments, irreversible deletes, publish/go-live, legal consent, subscription cancel, batch approve, emergency logout, gate-then-submit (see docs/USE-CASES.md)
- ✅ Keyboard and RTL — slider role, arrows, Home/End, pointer + touch
- ✅ Track fill — the travelled portion of the track uses the same colour as the thumb
- ✅ Server validation — required fields add
IsTrue; an incomplete POST is invalid - ✅ Works with or without Stimulus — built IIFE + MutationObserver, or a Stimulus controller
- ✅ TypeScript + Vite + pnpm — bundle IIFE is built with Vite; the Symfony 8 demo uses Pentatrion Vite (
pentatrion/vite-bundle+vite-plugin-symfony) and pnpm only - ✅ Compatible with Symfony 7 and 8 and FrankenPHP
Installation
1. Register the bundle in config/bundles.php:
2. Form theme: The bundle automatically adds its form theme from the form_theme option (see Configuration). Set form_theme in config/packages/nowo_slide_to_confirm.yaml to match your app (e.g. bootstrap_5_layout.html.twig).
3. Include the frontend assets using the named asset package:
4. (Optional) Translations — domain NowoSlideToConfirmBundle with the seven required locales (en, es, it, fr, pt, de, nl).
Full steps: docs/INSTALLATION.md.
Requirements
- PHP >= 8.1
- Symfony 6, 7 or 8 (
^6.0 || ^7.0 || ^8.0), including the mandatory floor 7.4, 8.0, and 8.1 - Stimulus optional — use the built script, or register the controller
- Vite to rebuild assets (or use the pre-built files in
src/Resources/public)
Configuration
See docs/CONFIGURATION.md for built-in profiles and Symfony form themes.
Usage
Render with a child loop (no extra submit button unless you use profile gate):
On a valid POST, confirm is mapped: false by default — read $form->get('confirm')->getData() (boolean). Full FormType + controller walkthrough: docs/USAGE.md.
Use cases
| Case | Profile | How to use |
|---|---|---|
| Pay / send money | payment |
SlideToConfirmType after amount + IBAN |
| Delete / wipe | danger |
Ack checkbox + slide |
| Publish / go live | publish |
Slide replaces “Publish” |
| Accept terms | legal |
Store contract version on valid POST |
| Cancel subscription | danger |
Custom text / confirmed_text |
| Approve batch | payment |
SwipeToSubmitType with a count in the label |
| Sign out everywhere | danger |
Invalidate sessions after isValid() |
| Unlock then submit | gate |
Slide enables a SubmitType (no auto-POST) |
Copy-paste FormTypes and controllers for all eight cases: docs/USAGE.md. Demo: ?case=payment (and delete, publish, legal, cancel, batch, emergency, gate).
Demo
The Symfony 8.1 demo is in demo/symfony8. Run from the bundle root: make up-symfony8 (http://localhost:8055). See demo/README.md.
The demos use FrankenPHP. Default FRANKENPHP_MODE=worker (Caddyfile with worker { file; watch }). Set FRANKENPHP_MODE=classic for per-request PHP so Twig/asset changes show on refresh (see docs/DEMO-FRANKENPHP.md).
Development
Run tests and QA with Docker: make up && make install && make test (or make test-coverage, make qa). Without Docker: composer install && composer test. See Makefile for all targets.
Documentation
- Installation
- Configuration
- Usage
- Contributing
- Code of Conduct
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
Additional documentation
- Use cases — payments, deletes, legal, gate, and copy-paste FormTypes
- Theming — CSS tokens, form themes, template overrides
- Demo with FrankenPHP
- GitHub Actions CI requirements
- PSR evaluation (REQ-CS-007)
- GitHub About fields
Tests and coverage
- Tests: PHPUnit (PHP), Vitest (TS/JS)
- PHP: 100%
- TS/JS: 100%
License
The MIT License (MIT). Please see LICENSE for more information.
Author
Created by Nowo.tech
All versions of slide-to-confirm-bundle with dependencies
symfony/asset Version ^6.0 || ^7.0 || ^8.0
symfony/config Version ^6.0 || ^7.0 || ^8.0
symfony/dependency-injection Version ^6.0 || ^7.0 || ^8.0
symfony/form Version ^6.0 || ^7.0 || ^8.0
symfony/framework-bundle Version ^6.0 || ^7.0 || ^8.0
symfony/http-kernel Version ^6.0 || ^7.0 || ^8.0
symfony/translation Version ^6.0 || ^7.0 || ^8.0
symfony/twig-bundle Version ^6.0 || ^7.0 || ^8.0
symfony/validator Version ^6.0 || ^7.0 || ^8.0
twig/extra-bundle Version ^3.12
twig/string-extra Version ^3.12