- How do I install avalynx/avalynx-modal in a Laravel application?
- Install the package with Composer using composer require avalynx/avalynx-modal. Because Avalynx Modal is based on Bootstrap 5.3 and has no framework dependencies, you also need to make sure Bootstrap 5.3 CSS and JavaScript are available in your application. After that, you can render modals from your PHP code or Blade templates using the package API.
- Does Avalynx Modal require Bootstrap to work?
- Yes, Avalynx Modal is built on Bootstrap 5.3 or higher and relies on Bootstrap for its modal styling and behavior. It does not add any additional JavaScript framework dependencies such as jQuery, React, or Vue. You can load Bootstrap through a CDN or your existing Laravel asset pipeline.
- Can I use Avalynx Modal directly in Laravel Blade templates?
- Yes, the package is designed to integrate cleanly into Blade templates. You can use its simple API to render modals for confirmations, forms, and alerts alongside your existing Blade markup. This keeps modal definitions close to the views where they are used.
- Does Avalynx Modal support fullscreen modals?
- Yes, fullscreen support is one of the package features. You can use it for dialogs that need to occupy the entire viewport, such as detailed forms or large confirmation flows. Sizing and behavior can be controlled through the package API.
- Which Laravel versions are compatible with Avalynx Modal?
- Avalynx Modal is framework-agnostic and does not impose a Laravel-specific dependency, so it can be used with Laravel applications that meet its PHP requirements. You should confirm the required PHP version in the package composer.json before installing. The main frontend requirement is Bootstrap 5.3 or newer.
- How do I show a confirmation modal before deleting a record in Laravel?
- Render a modal containing your confirmation message and a form or button that submits the delete request. The modal can be triggered from a Blade view and wired to your existing Laravel route or controller action. This keeps the confirmation step in the UI while your application handles authorization and deletion on the server.
- Can I customize modal size and behavior with Avalynx Modal?
- Yes, the package provides options for controlling modal sizing and behavior. You can use these settings to match the modal to your application layout and interaction needs. The available options are exposed through the package API and can be applied when rendering a modal.
- Do I need npm or a frontend build step to use Avalynx Modal?
- No, Avalynx Modal is a PHP package and does not require npm or a JavaScript build step. You still need Bootstrap 5.3 CSS and JavaScript loaded in your application, either from a CDN or from your compiled assets. This makes it straightforward to add to existing Laravel projects.
- Is Avalynx Modal accessible for screen readers and keyboard users?
- Avalynx Modal is intended for rendering accessible modal dialogs, and Bootstrap 5.3 provides the underlying modal accessibility behavior such as focus handling and ARIA attributes. You should still follow accessibility best practices for your modal content, including clear labels and logical focus order. Testing with a keyboard and a screen reader is recommended for production use.
- How does Avalynx Modal compare to Livewire or custom Blade components for modals?
- Avalynx Modal is a lightweight option for adding Bootstrap-based modals without framework dependencies or a reactive frontend stack. It is a good fit for simple confirmations, forms, and alert dialogs rendered from Blade. If you need complex reactive behavior, Livewire or a dedicated component library may be a better fit.