adelali/filament-cards-select 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

adelali/filament-cards-select

最新稳定版本:v0.1.1

Composer 安装命令:

composer require adelali/filament-cards-select

包简介

Card-style radio and checkbox list components for Filament

README 文档

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.

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-09