- Does this package work with Filament v4 and v5? If so, are there any breaking changes between versions?
- Yes, this package supports both Filament v4 and v5. However, ensure you’re using the correct syntax for your Filament version, as some method names or configurations may differ. Always check the package’s changelog for version-specific updates or breaking changes.
- How do I install and set up this package in my Laravel Filament project?
- First, run `composer require codewithdennis/filament-advanced-choice`. Then, add `@source '../../../../vendor/codewithdennis/filament-advanced-choice/resources/**/*.blade.php';` to your Filament theme’s CSS file. Finally, rebuild your assets with `npm run build` or `npm run dev`.
- Can I use these components with existing Filament form fields like Radio or CheckboxList?
- Yes, these components are designed to replace or augment existing Filament form fields. For example, you can use `RadioCard` instead of `Radio` or `CheckboxList` with descriptions instead of the default `CheckboxList`. The package maintains compatibility with Filament’s form logic and validation.
- What are the deprecated aliases, and should I use them in new projects?
- The package includes deprecated plural aliases like `RadioCards` or `CheckboxCards`. For new projects, use the singular versions (`RadioCard`, `CheckboxCard`) to avoid future compatibility issues. The deprecated aliases will still work but may be removed in future updates.
- How do I customize the styling of these components to match my Filament theme?
- The package uses CSS variables for theming, so you can override styles in your Filament theme’s CSS file. If you’re using a custom theme, ensure you’ve included the `@source` directive for the package’s Blade files. For dark mode or other customizations, target the relevant CSS classes or variables.
- Are these components accessible for screen readers and other assistive technologies?
- The components follow Filament’s accessibility standards, but custom layouts like stacked cards may introduce edge cases. Test with tools like axe or manual screen reader checks, especially if you’ve heavily customized the styling or added complex interactions.
- Can I use these components with Filament’s Repeater or other nested forms?
- Yes, the package supports nested forms, including Repeater. However, test thoroughly with complex forms, as historical issues (e.g., v1.0.6) have been resolved but edge cases may still exist. Ensure your Repeater configuration aligns with Filament’s latest best practices.
- How do I handle large option sets (e.g., 50+ options) without performance issues?
- The package includes searchable and bulk-toggleable options for better usability. For very large sets, consider lazy-loading options via JavaScript or server-side filtering. Test performance with your expected maximum option count, as heavy UI customization (e.g., cards) can impact rendering.
- What happens if I upgrade Filament, and this package isn’t updated yet? Will it break?
- Upgrading Filament may break compatibility until the package releases an update. Monitor the package’s GitHub repository for Filament version support announcements. If needed, fork the package or implement fallbacks for critical components.
- Are there alternatives to this package for Filament form customization?
- If you need simpler customizations, Filament’s built-in `Radio` and `CheckboxList` fields may suffice. For advanced layouts, consider packages like `filament-spatie/laravel-filament-settings` for settings pages or `filament/filament`’s experimental components. However, this package offers the most tailored Filament-native solutions for card/stacked layouts.