adelali/filament-cards-select

Card-style radio and checkbox list components for Filament

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:Blade

pkg:composer/adelali/filament-cards-select

v0.1.1 2025-12-09 20:54 UTC

This package is auto-updated.

Last update: 2025-12-09 20:56:00 UTC


README

Card-style radio and checkbox list components for Filament v4.

Installation

You can install the package via composer:

composer require adelali/filament-cards-select

Usage

Basic Radio Selection

use Adelali\FilamentCardsSelect\Forms\Components\CardRadio;

CardRadio::make('plan')
    ->options([
        'basic' => 'Basic Plan',
        'pro' => 'Pro Plan',
        'enterprise' => 'Enterprise Plan',
    ])

With Descriptions

CardRadio::make('plan')
    ->options([
        'basic' => 'Basic Plan',
        'pro' => 'Pro Plan',
        'enterprise' => 'Enterprise Plan',
    ])
    ->descriptions([
        'basic' => 'Perfect for individuals getting started',
        'pro' => 'For growing teams and businesses',
        'enterprise' => 'Custom solutions for large organizations',
    ])

Multiple Selection (Checkbox List)

CardRadio::make('features')
    ->multiple()
    ->options([
        'sso' => 'Single Sign-On',
        'api' => 'API Access',
        'support' => 'Priority Support',
    ])

Or use the alias:

CardRadio::make('features')
    ->checkboxList()
    ->options([...])

Boolean Selection

CardRadio::make('is_active')
    ->boolean('Active', 'Inactive')

Grid Columns

Control the number of columns in the grid:

CardRadio::make('plan')
    ->options([...])
    ->columns(2)

Responsive columns with breakpoints:

CardRadio::make('plan')
    ->options([...])
    ->columns([
        'default' => 1,
        'sm' => 2,
        'md' => 3,
        'lg' => 4,
    ])

Inline Layout

Display options inline:

CardRadio::make('plan')
    ->options([...])
    ->inline()

Disabling Options

CardRadio::make('plan')
    ->options([
        'basic' => 'Basic Plan',
        'pro' => 'Pro Plan',
        'enterprise' => 'Enterprise Plan',
    ])
    ->disableOptionWhen(fn (string $value): bool => $value === 'enterprise')

Requirements

  • PHP 8.2+
  • Filament v4

License

The MIT License (MIT). Please see License File for more information.