PHP code example of awcodes / preset-color-picker

1. Go to this page and download the library: Download awcodes/preset-color-picker 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/ */

    

awcodes / preset-color-picker example snippets


PresetColorPicker::make('color')
    ->colors([
        // array of Filament Color objects    
    ])
    ->size('sm') // optional 'xs', 'sm', 'md', 'lg'
    ->withBlack(swap: '#111111')
    ->withWhite(swap: '#f5f5f5'),
js
content: [
    './vendor/awcodes/preset-color-picker/resources/views/**/*.blade.php',
]