PHP code example of vitisstudio / filament-choosable-chips
1. Go to this page and download the library: Download vitisstudio/filament-choosable-chips library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vitisstudio / filament-choosable-chips example snippets
ChoosableChips::make('sizes')
->multiple()
->checkSelected() // also auto-on when no icons() are set
->selectedColor('success') // color of the check (default: success)
->options([
'sm' => 'S',
'md' => 'M',
'lg' => 'L',
]);
use Filament\Support\Enums\Size;
ChoosableChips::make('a')->size(Size::ExtraSmall); // or ->size('xs')
ChoosableChips::make('b')->size(Size::Small); // or ->size('sm')
ChoosableChips::make('c')->size(Size::Medium); // default
use VitisStudio\FilamentChoosableChips\Forms\Components\ChoosableChips;
ChoosableChips::configureUsing(fn (ChoosableChips $component) => $component->size('sm'));