Summary
Premium image choice cards — full-bleed image, footer with label and selection indicator, two layout variants. One component covers radio exclusive (multiple(false)) and checkbox multi (multiple(true) with min/max/exact).
Layout variants
Both variants support radio and checkbox modes,
size, rounding, gridColumns, imageAspectRatio, imageFit, disabledOptions, and dark mode.
Invalid variant() values fall back to default.
Basic usage
Radio exclusive (default layout)
select).
Overlay layout
imageAspectRatio() to control card height in overlay mode (ratio applies to the whole card, not only the media block).
Checkbox multi with limits
maxSelections is reached, further options cannot be selected until one is cleared. Works with either layout variant.
State & validation
Stored value
Validation rules (built-in)
Translation keys:
filament-flex-fields::default.validation.image_choice_cards.{min,max,exact,invalid_option}.
Reactive disabled options
->live() so the Closure re-runs. Image Choice Cards has no wire:ignore on the root, so Livewire morph refreshes the disabled map. If the current selection becomes disabled, state is cleared (single → null, multi → filtered array) on the server and in Alpine.
Options shape
Empty / missing
image shows a muted placeholder block.
String shorthand is supported: 'athletic' => 'Athletic' normalizes to ['label' => 'Athletic'].
Fluent API
All methods acceptClosure unless noted.
FlexFieldFormBuilder / Studio config
Defaults: see
FieldTypeDefaultConfigRegistry for image_choice_cards.
Playground
/admin/flex-fields/image-choice-cards
Demos: square 1:1, overlay layout, radio exclusive, checkbox min/max, size/rounding/aspect matrix, Select → reactive disabledOptions, required validation, dark mode via panel.
CSS / JS
CSS classes (reference)
Visual behavior
- Hover: subtle image zoom (
scale(1.04)) inside clipped media. - Reload: selected state is server-rendered (
is-selected,checked) before Alpine loads to avoid flash. - Overlay scrim:
::afteron.fff-image-choice-cards__item—z-indexbetween image and footer.
See also
Keyboard, direction and safe values
Use Tab to reach the control, Space or Enter to select, and arrow keys or Home / End to navigate enabled options. In a single-selection group, arrow navigation also changes the value. Multiple-selection groups move focus without changing selections. Horizontal navigation follows the text direction. Direction is inherited from the page, or can be set on this field:exactSelections() takes precedence over minimum and maximum settings. The
selection cap also blocks additional choices immediately; selected choices can
always be removed. Negative limits and a minimum above the maximum are invalid
configuration. If a stored selection is now disabled, resolve it before saving;
Image Choice Cards can clear disabled choices with pruneDisabledSelection().