- How do I install and use livewire-form in a Laravel 11 project?
- Run `composer require hungnm28/livewire-form`, then publish the config, views, and assets with `php artisan vendor:publish --tag=livewire-form-config --tag=livewire-form-views --tag=livewire-form-assets`. Use components like `<x-lf::form.input name='email' />` in your Blade templates. Ensure Tailwind CSS is configured to scan the package’s views.
- Does this package work with Livewire 4 and Laravel 13?
- Yes, the package supports Laravel 10–13 and Livewire 3/4. However, test thoroughly in a staging environment, as Livewire 4’s Alpine.js integration may introduce edge cases. Monitor for breaking changes in future updates.
- Can I use livewire-form without Tailwind CSS?
- No, the package is tightly coupled to Tailwind CSS. If your project uses Bootstrap, Bulma, or another framework, you’ll need to manually override styles or migrate to Tailwind. The `primary-*` color utilities are a core dependency.
- How do I customize the primary color scheme for my existing design system?
- Publish the package assets and update your Tailwind config to redefine the `primary` color palette. For example, add `@layer components { @apply text-[your-primary] bg-[your-primary-500] }` to your CSS or extend the `theme.colors` in `tailwind.config.js`.
- Will this package conflict with my existing Alpine.js setup?
- Potential conflicts may arise if your app overrides Livewire’s default Alpine.js instance. Ensure Alpine is still available for the package’s interactive features (modals, theme toggles). Isolate package assets or use Livewire’s default Alpine instance to mitigate issues.
- How does livewire-form handle Laravel validation errors?
- The package integrates with Laravel’s validation system but lacks built-in error display components. You’ll need to manually style validation errors or extend the package to include inline error messages. Check the `wire:error` directive in Livewire for custom error handling.
- Do I need to install Tabler Icons separately?
- Yes, the package uses Tabler Icons. Include the Tabler Icons webfont in your project or replace them with another icon set by modifying the published assets. Licensing considerations may apply depending on your choice.
- What’s the best way to test this package in production?
- Start with a staging environment to validate interactions like modals, theme toggles, and form submissions. Test edge cases such as nested forms, dynamic fields, and accessibility compliance. Monitor performance with large forms, as lazy-loading or virtual scrolling may be needed.
- Are there alternatives to livewire-form for Laravel + Livewire?
- Consider Laravel Livewire’s built-in components, or explore packages like `filament/forms` for opinionated form handling, or `laravel-breeze` for simpler starter templates. Evaluate alternatives based on your need for Tailwind integration and Alpine.js interactivity.
- How do I extend or override the package’s components?
- Publish the views and assets, then create custom Blade components in your project that extend the package’s components (e.g., `<x-lf::form.input>`). Override styles in your Tailwind config or CSS. For JavaScript, extend the Alpine.js store or override the published JS file.