- How do I install and set up livewire-ui-components in a Laravel project?
- Run `composer require artisanpack-ui/livewire-ui-components`, then execute `php artisan livewire-ui-components:install` to set up the package. Finally, compile assets with `npm run dev` to ensure all Tailwind and DaisyUI styles are processed. The installer handles configuration automatically.
- Does this package support Livewire 4’s new features like `wire:stream` or `wire:sort`?
- Yes, the package explicitly supports Livewire 4 features such as `wire:stream` and `wire:sort`. Components are designed to work out of the box, but some advanced features may require feature detection or minor adjustments if using Livewire 3.
- Can I customize the DaisyUI theme to match my existing design system?
- Absolutely. Use the `php artisan artisanpack:generate-theme` command to create a custom theme. This allows you to override DaisyUI’s default colors, spacing, and styles while maintaining the package’s functionality. Theming is fully documented in the package’s wiki.
- Will using this package slow down my Laravel application’s build process?
- The package includes optional npm dependencies (e.g., apexcharts, flatpickr) for interactive components, which can increase bundle size. To mitigate this, lazy-load non-critical components or use dynamic imports. The package also supports Tailwind’s JIT mode for optimized builds.
- Are there any breaking changes I should expect when upgrading to v3.0+?
- Major versions may introduce breaking changes, particularly around Livewire 4 compatibility or theming APIs. Always check the changelog and migration guide in the package’s documentation. The package maintains backward compatibility for minor updates, but testing is recommended for critical applications.
- How do I handle large datasets (e.g., tables with 10,000+ rows) with this package?
- The package includes optimized table components with built-in pagination and Livewire’s streaming capabilities. For massive datasets, leverage Livewire’s `wire:sort` and `wire:stream` features to load data incrementally. The `WithTableExport` trait also supports exporting data efficiently.
- Can I extend or override existing components (e.g., custom buttons or modals)?
- Yes, components are designed for extensibility. You can publish and override them using Laravel’s view publishing system (`php artisan vendor:publish`). Customize slots, props, or styles via Tailwind classes or by extending the component’s Blade template.
- Are there alternatives to this package for Livewire UI components?
- Alternatives include Laravel Heroicons (for icons), Livewire Tables (for data tables), and Tailwind UI (for pre-built components). However, this package uniquely combines 70+ components, DaisyUI integration, and Livewire 4 support in a single, cohesive library tailored for the TALL stack.
- How do I test components in my application before full deployment?
- Start by integrating non-critical components (e.g., buttons, cards) on admin panels or forms. Use the package’s interactive installer to generate a demo page (`php artisan livewire-ui-components:demo`) for quick testing. Monitor performance and edge cases before scaling to core features.
- Does this package work with existing Tailwind or DaisyUI configurations?
- The package is designed to integrate seamlessly with existing Tailwind and DaisyUI setups. However, conflicts may arise if custom DaisyUI themes or Tailwind config overrides exist. The installer provides options to merge or override configurations during setup, and the package’s theming system allows for granular control.