- How do I install RadioDeck in a Laravel project using Filament v4?
- Run `composer require jaocero/radio-deck` and create a custom Filament theme with `php artisan make:filament-theme`. Add `@source '../../../../vendor/jaocero/radio-deck/resources/views'` to your theme’s CSS file (e.g., `resources/css/filament/admin/theme.css`). Ensure your project meets the requirements: Filament v4, PHP 8.2+, Laravel 11.28+, and Tailwind v4.
- Does RadioDeck work with Filament v3? If not, what’s the migration path?
- RadioDeck is designed for Filament v4 only. To migrate from v3, upgrade Filament to v4, create a custom theme, and update your `tailwind.config.js` to remove old vendor paths. Replace Radio components incrementally, testing form submissions and validation. The package provides a detailed migration guide in its README.
- Can I use RadioDeck with Laravel enums for type-safe radio options?
- Yes, RadioDeck supports Laravel/PHP enums natively. Define your radio options using enums (e.g., `public enum Status: string { Case1 = 'option1'; Case2 = 'option2'; }`) and pass them to the `options()` method. This ensures type safety and reduces runtime errors while maintaining clean, maintainable code.
- Will RadioDeck’s card layout impact form performance if I have many options?
- Performance depends on the number of options and their complexity. For forms with >50 options, consider paginating or lazy-loading options to avoid rendering delays. RadioDeck uses Tailwind for styling, so heavy customizations (e.g., large images or complex icons) may slow rendering. Test with your expected dataset size in a staging environment.
- How do I customize the icons or styling in RadioDeck cards?
- RadioDeck uses Heroicons by default, which are registered via Filament’s icon system. To customize icons, extend Filament’s icon registry or override styles in your custom theme’s CSS. For Tailwind classes, modify the card’s Blade template (located in the package’s `resources/views`) by extending or overriding the `@source` directive in your theme file.
- Is RadioDeck accessible (WCAG-compliant) for screen readers?
- RadioDeck maintains Filament’s default radio button accessibility, including keyboard navigation and focus states. However, card-based interactions may require additional testing. Ensure your custom icons have proper ARIA labels and that the card structure doesn’t disrupt screen reader flows. Test with tools like axe or manual keyboard-only navigation.
- Can I use RadioDeck in a multi-select scenario (multiple selections)?
- Yes, RadioDeck supports multi-select via the `multiple()` method, which returns an array of selected values. However, this introduces state management complexity. Ensure your form validation and backend logic handle array inputs, and test edge cases like empty selections or concurrent updates.
- What alternatives exist if I don’t want to use RadioDeck or Filament v4?
- For Filament v3, consider custom Blade components or third-party packages like `spatie/laravel-filament-resources`. If not using Filament, build a custom radio card component with Livewire or Alpine.js, but you’ll need to handle state, validation, and theming manually. RadioDeck’s primary advantage is seamless integration with Filament’s ecosystem.
- How do I handle conflicts with existing Tailwind configurations in my Filament theme?
- RadioDeck relies on Tailwind v4, which is already a Filament v4 requirement. Conflicts typically arise from duplicate or conflicting utility classes. Use Tailwind’s `@apply` directive in your theme’s CSS to override styles, or extend the package’s Blade templates to customize classes. Test your theme after updates to ensure consistency.
- Is RadioDeck actively maintained? What’s the long-term support outlook?
- RadioDeck was last updated in April 2026 and aligns with Filament v4’s roadmap. While it has zero dependents, the package’s maintenance status is tied to Filament’s updates. For critical projects, monitor the GitHub repository for releases or consider contributing to ensure long-term compatibility. The package does not support Filament v3, so plan accordingly if stuck on v3.