{"id":37004488,"url":"https://github.com/199ocero/radio-deck","last_synced_at":"2026-02-02T02:05:45.911Z","repository":{"id":214420881,"uuid":"736481208","full_name":"199ocero/radio-deck","owner":"199ocero","description":"Turn filament default radio button into a selectable card with icons, title and description.","archived":false,"fork":false,"pushed_at":"2025-09-15T23:51:42.000Z","size":701,"stargazers_count":80,"open_issues_count":0,"forks_count":24,"subscribers_count":1,"default_branch":"4.x","last_synced_at":"2025-11-11T05:51:41.514Z","etag":null,"topics":["filament-form","filamentphp","filamentphp-plugin"],"latest_commit_sha":null,"homepage":"https://filamentphp.com/plugins/jaocero-radio-deck","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/199ocero.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"jaocero"}},"created_at":"2023-12-28T03:03:48.000Z","updated_at":"2025-11-08T21:03:03.000Z","dependencies_parsed_at":"2024-02-29T00:25:02.125Z","dependency_job_id":"ec4d04b6-d44f-4022-9efd-93947a56caf3","html_url":"https://github.com/199ocero/radio-deck","commit_stats":null,"previous_names":["199ocero/radio-deck"],"tags_count":18,"template":false,"template_full_name":"filamentphp/plugin-skeleton","purl":"pkg:github/199ocero/radio-deck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/199ocero%2Fradio-deck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/199ocero%2Fradio-deck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/199ocero%2Fradio-deck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/199ocero%2Fradio-deck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/199ocero","download_url":"https://codeload.github.com/199ocero/radio-deck/tar.gz/refs/heads/4.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/199ocero%2Fradio-deck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filament-form","filamentphp","filamentphp-plugin"],"created_at":"2026-01-14T00:38:18.647Z","updated_at":"2026-01-14T00:38:19.436Z","avatar_url":"https://github.com/199ocero.png","language":"PHP","readme":"# Radio Deck\n\n\u003cdiv class=\"filament-hidden\"\u003e\n    \n![Header](https://raw.githubusercontent.com/199ocero/radio-deck/main/art/images/jaocero-radio-deck.jpeg)\n\n\u003c/div\u003e\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/jaocero/radio-deck.svg?style=flat-square)](https://packagist.org/packages/jaocero/radio-deck)\n[![Total Downloads](https://img.shields.io/packagist/dt/jaocero/radio-deck.svg?style=flat-square)](https://packagist.org/packages/jaocero/radio-deck)\n\nTurn filament default radio button into a selectable card with icons, title and description.\n\n## Requirements\n\n- FilamentPHP v4.x\n- PHP 8.2+\n- Laravel v11.28+\n- Tailwind CSS v4.0+\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require jaocero/radio-deck\n```\n\n### For FilamentPHP v4 Users\n\nTo adhere to Filament's theming approach, you'll be required to employ a personalized theme in order to utilize this plugin.\n\n\u003e **Custom Theme Installation**\n\u003e [Filament v4 Docs - Creating a Custom Theme](https://filamentphp.com/docs/4.x/styling/overview#creating-a-custom-theme)\n\nInstead of adding the plugin's views to your `tailwind.config.js` file, add the following source directive to your custom theme's CSS file (usually `resources/css/filament/admin/theme.css`):\n\n```css\n@source '../../../../vendor/jaocero/radio-deck/resources/views';\n```\n\nThis will include the plugin's styles during the compilation process.\n\n## Migration from v3 to v4\n\nIf you're upgrading from Radio Deck v3 to v4, please follow these steps:\n\n### 1. Update Dependencies\n\n```bash\ncomposer require jaocero/radio-deck:^2.0\n```\n\n### 2. Create a Custom Theme\n\nSince FilamentPHP v4 requires custom themes for plugins, you need to create one:\n\n```bash\nphp artisan make:filament-theme\n```\n\n### 3. Update Theme Configuration\n\n**Remove** the old configuration from your `tailwind.config.js`:\n\n```js\n// Remove this from tailwind.config.js\ncontent: [\n    ...\n    './vendor/jaocero/radio-deck/resources/views/**/*.blade.php', // Remove this line\n]\n```\n\n**Add** the source directive to your theme's CSS file instead:\n\n```css\n/* Add this to resources/css/filament/admin/theme.css */\n@source '../../../../vendor/jaocero/radio-deck/resources/views';\n```\n\n### 4. Update Import Statements\n\nUpdate your import statements to use the new namespace structure:\n\n```php\n// Old (v1.x)\nuse JaOcero\\RadioDeck\\Forms\\Components\\RadioDeck;\n\n// New (v2.x) - Same import, but make sure you're using v2.x\nuse JaOcero\\RadioDeck\\Forms\\Components\\RadioDeck;\n```\n\n### 5. Method Changes\n\nSome method names have been updated for better consistency:\n\n```php\n// Old method\n-\u003egap('gap-4')\n\n// New method (renamed for clarity \u0026 to avoid conflicts with Filament’s built-in gap)\n-\u003eoptionsGap('gap-4') \n```\n\n## Usage\n\n```php\nuse JaOcero\\RadioDeck\\Forms\\Components\\RadioDeck;\nuse Filament\\Support\\Enums\\IconSize;\nuse Filament\\Support\\Enums\\Alignment;\nuse Filament\\Support\\Enums\\IconPosition;\n\npublic static function form(Form $form): Form\n{\n    return $form\n        -\u003eschema([\n            RadioDeck::make('name')\n                -\u003eoptions([\n                    'ios' =\u003e 'iOS',\n                    'android' =\u003e 'Android',\n                    'web' =\u003e 'Web',\n                    'windows' =\u003e 'Windows',\n                    'mac' =\u003e 'Mac',\n                    'linux' =\u003e 'Linux',\n                ])\n                -\u003edescriptions([\n                    'ios' =\u003e 'iOS Mobile App',\n                    'android' =\u003e 'Android Mobile App',\n                    'web' =\u003e 'Web App',\n                    'windows' =\u003e 'Windows Desktop App',\n                    'mac' =\u003e 'Mac Desktop App',\n                    'linux' =\u003e 'Linux Desktop App',\n                ])\n                -\u003eicons([\n                    'ios' =\u003e 'heroicon-m-device-phone-mobile',\n                    'android' =\u003e 'heroicon-m-device-phone-mobile',\n                    'web' =\u003e 'heroicon-m-globe-alt',\n                    'windows' =\u003e 'heroicon-m-computer-desktop',\n                    'mac' =\u003e 'heroicon-m-computer-desktop',\n                    'linux' =\u003e 'heroicon-m-computer-desktop',\n                ])\n                -\u003erequired()\n                -\u003eiconSizes(IconSize::Medium) // Medium | Small | Large | ExtraLarge | TwoExtraLarge\n                -\u003eiconPosition(IconPosition::Before) // Before | After\n                -\u003ealignment(Alignment::Center) // Start | Center | End\n                -\u003eoptionGap('gap-5') // Gap between Options and Descriptions between the Icon\n                -\u003epadding('px-4 py-6') // Padding around the deck\n                -\u003eextraCardsAttributes([ // Extra attributes for card elements\n                    'class' =\u003e 'rounded-xl'\n                ])\n                -\u003eextraOptionsAttributes([ // Extra attributes for option elements\n                    'class' =\u003e 'text-3xl leading-none w-full flex flex-col items-center justify-center p-4'\n                ])\n                -\u003eextraDescriptionsAttributes([ // Extra attributes for description elements\n                    'class' =\u003e 'text-sm font-light text-center'\n                ])\n                -\u003emultiple() // Enable multiple selection (returns array)\n                -\u003ecolors('primary')\n                // or you can use an array of colors per option or you can use one color for all options\n                // -\u003ecolors([\n                //     'ios' =\u003e 'blue',\n                //     'android' =\u003e 'green',\n                //     'web' =\u003e 'purple',\n                // ])\n                -\u003ecolumns(3)\n                // or you can use how many columns every screen size\n                // -\u003ecolumns([\n                //     'sm' =\u003e 1,\n                //     'md' =\u003e 2,\n                //     'lg' =\u003e 3,\n                // ])\n                -\u003ecolumnSpanFull()\n        ]);\n}\n```\n\n### Using Enums\n\nYou can also utilize an Enum class for `-\u003eoptions()`, `-\u003edescriptions()`, and `-\u003eicons()`. Here's an example:\n\n```php\n\u003c?php\n\nnamespace App\\Filament\\Enums;\n\nuse Filament\\Support\\Contracts\\HasLabel;\nuse JaOcero\\RadioDeck\\Contracts\\HasDescriptions;\nuse JaOcero\\RadioDeck\\Contracts\\HasIcons;\n\nenum AssetType: string implements HasLabel, HasDescriptions, HasIcons\n{\n    case iOs = 'ios';\n    case Android = 'android';\n    case Web = 'web';\n    case Windows = 'windows';\n    case Mac = 'mac';\n    case Linux = 'linux';\n\n    public function getLabel(): ?string\n    {\n        return match ($this) {\n            self::iOs =\u003e 'iOS',\n            self::Android =\u003e 'Android',\n            self::Web =\u003e 'Web',\n            self::Windows =\u003e 'Windows',\n            self::Mac =\u003e 'Mac',\n            self::Linux =\u003e 'Linux',\n        };\n    }\n\n    public function getDescriptions(): ?string\n    {\n        return match ($this) {\n            self::iOs =\u003e 'iOS Mobile App',\n            self::Android =\u003e 'Android Mobile App',\n            self::Web =\u003e 'Web App',\n            self::Windows =\u003e 'Windows Desktop App',\n            self::Mac =\u003e 'Mac Desktop App',\n            self::Linux =\u003e 'Linux Desktop App',\n        };\n    }\n\n    public function getIcons(): ?string\n    {\n        return match ($this) {\n            self::iOs =\u003e 'heroicon-m-device-phone-mobile',\n            self::Android =\u003e 'heroicon-m-device-phone-mobile',\n            self::Web =\u003e 'heroicon-m-globe-alt',\n            self::Windows =\u003e 'heroicon-m-computer-desktop',\n            self::Mac =\u003e 'heroicon-m-computer-desktop',\n            self::Linux =\u003e 'heroicon-m-computer-desktop',\n        };\n    }\n}\n```\n\nUsage with Enum:\n\n```php\npublic static function form(Form $form): Form\n{\n    return $form\n        -\u003eschema([\n            RadioDeck::make('name')\n                -\u003eoptions(AssetType::class)\n                -\u003edescriptions(AssetType::class)\n                -\u003eicons(AssetType::class)\n                -\u003erequired()\n                -\u003eiconPosition(IconPosition::Before)\n                -\u003ealignment(Alignment::Center)\n                -\u003ecolors('primary')\n                -\u003ecolumns(3),\n        ])\n        -\u003ecolumns('full');\n}\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Jay-Are Ocero](https://github.com/199ocero)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","funding_links":["https://github.com/sponsors/jaocero"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F199ocero%2Fradio-deck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F199ocero%2Fradio-deck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F199ocero%2Fradio-deck/lists"}