|  | 
|  | 1 | +--- | 
|  | 2 | +title: Styling | 
|  | 3 | +weight: 4 | 
|  | 4 | +--- | 
|  | 5 | + | 
|  | 6 | +The Menu utilises the AlpineJS Anchor plugin (which uses the Floating UI project), to ensure correct responsive behaviour of the menu. | 
|  | 7 | + | 
|  | 8 | +## setColumnSelectButtonAttributes | 
|  | 9 | +Allows for customisation of the appearance of the "Column Select" button | 
|  | 10 | + | 
|  | 11 | +Note that this utilises a refreshed approach for attributes, and allows for appending to, or replacing the styles and colors independently, via the below methods. | 
|  | 12 | + | 
|  | 13 | +### default-colors | 
|  | 14 | +Setting to false will disable the default colors for the Column Select button, the default colors are: | 
|  | 15 | + | 
|  | 16 | +Bootstrap: None | 
|  | 17 | + | 
|  | 18 | +Tailwind: `text-gray-700 bg-white border-gray-300 hover:bg-gray-50 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600` | 
|  | 19 | + | 
|  | 20 | +### default-styling | 
|  | 21 | +Setting to false will disable the default styling for the Column Select button, the default styling is: | 
|  | 22 | + | 
|  | 23 | +Bootstrap: `btn dropdown-toggle d-block w-100 d-md-inline` | 
|  | 24 | + | 
|  | 25 | +Tailwind: `inline-flex justify-center px-4 py-2 w-full text-sm font-medium rounded-md border shadow-sm focus:ring focus:ring-opacity-50` | 
|  | 26 | + | 
|  | 27 | +```php | 
|  | 28 | +public function configure(): void | 
|  | 29 | +{ | 
|  | 30 | +  $this->setColumnSelectButtonAttributes([ | 
|  | 31 | +    'class' => 'focus:border-rose-300 focus:ring-1 focus:ring-rose-300 focus-visible:outline-rose-300', // Add these classes to the column select button | 
|  | 32 | +    'default-colors' => false, // Do not output the default colors | 
|  | 33 | +    'default-styling' => true // Output the default styling | 
|  | 34 | +  ]); | 
|  | 35 | +} | 
|  | 36 | +``` | 
|  | 37 | + | 
|  | 38 | + | 
|  | 39 | +## setColumnSelectMenuAttributes | 
|  | 40 | +Allows for customisation of the appearance of the "Column Select" menu | 
|  | 41 | + | 
|  | 42 | +Note that this utilises a refreshed approach for attributes, and allows for appending to, or replacing the styles and colors independently, via the below methods. | 
|  | 43 | + | 
|  | 44 | +```php | 
|  | 45 | +public function configure(): void | 
|  | 46 | +{ | 
|  | 47 | +  $this->setColumnSelectMenuAttributes([ | 
|  | 48 | +    'class' => 'text-rose-300 focus:border-rose-300 focus:ring-rose-300', // Add these classes to the column select menu option checkbox | 
|  | 49 | +    'default-colors' => false, // Do not output the default colors | 
|  | 50 | +    'default-styling' => true // Output the default styling | 
|  | 51 | +  ]); | 
|  | 52 | +} | 
|  | 53 | +``` | 
|  | 54 | + | 
|  | 55 | +## setColumnSelectMenuAttributes Transition Behaviour | 
|  | 56 | + | 
|  | 57 | +To modify the transition behaviour, you can customise any of the x-transition properties, which by default are: | 
|  | 58 | +```php | 
|  | 59 | +    'x-transition:enter' => 'transition ease-out duration-100', | 
|  | 60 | +    'x-transition:enter-start' => 'transform opacity-0 scale-95', | 
|  | 61 | +    'x-transition:enter-end' => 'transform opacity-100 scale-100', | 
|  | 62 | +    'x-transition:leave' => 'transition ease-in duration-75', | 
|  | 63 | +    'x-transition:leave-start' => 'transform opacity-100 scale-100', | 
|  | 64 | +    'x-transition:leave-end' => 'transform opacity-0 scale-95', | 
|  | 65 | +``` | 
|  | 66 | +By replacing the relevant attribute, for example, this would slow the "enter" behaviour to 3000ms instead of the default 100ms. | 
|  | 67 | + | 
|  | 68 | +```php | 
|  | 69 | +public function configure(): void | 
|  | 70 | +{ | 
|  | 71 | +  $this->setColumnSelectMenuAttributes([ | 
|  | 72 | +    'x-transition:enter' => 'transition ease-out duration-200', | 
|  | 73 | +    'default-colors' => true, // Output the default colors | 
|  | 74 | +    'default-styling' => true // Output the default styling | 
|  | 75 | +  ]); | 
|  | 76 | +} | 
|  | 77 | +``` | 
|  | 78 | + | 
|  | 79 | +## setColumnSelectMenuOptionCheckboxAttributes | 
|  | 80 | +Allows for customisation of the appearance of the "Column Select" menu option checkbox | 
|  | 81 | + | 
|  | 82 | +Note that this utilises a refreshed approach for attributes, and allows for appending to, or replacing the styles and colors independently, via the below methods. | 
|  | 83 | + | 
|  | 84 | +### default-colors | 
|  | 85 | +Setting to false will disable the default colors for the Column Select menu option checkbox, the default colors are: | 
|  | 86 | + | 
|  | 87 | +Bootstrap: None | 
|  | 88 | + | 
|  | 89 | +Tailwind: `text-indigo-600 border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600` | 
|  | 90 | + | 
|  | 91 | +### default-styling | 
|  | 92 | + | 
|  | 93 | +Setting to false will disable the default styling for the Column Select menu option checkbox, the default styling is: | 
|  | 94 | + | 
|  | 95 | +Bootstrap 4: None | 
|  | 96 | + | 
|  | 97 | +Bootstrap 5: `form-check-input` | 
|  | 98 | + | 
|  | 99 | +Tailwind: `transition duration-150 ease-in-out rounded shadow-sm focus:ring focus:ring-opacity-50 disabled:opacity-50 disabled:cursor-wait` | 
|  | 100 | + | 
|  | 101 | +```php | 
|  | 102 | +public function configure(): void | 
|  | 103 | +{ | 
|  | 104 | +  $this->setColumnSelectMenuOptionCheckboxAttributes([ | 
|  | 105 | +    'class' => 'text-rose-300 focus:border-rose-300 focus:ring-rose-300', // Add these classes to the column select menu option checkbox | 
|  | 106 | +    'default-colors' => false, // Do not output the default colors | 
|  | 107 | +    'default-styling' => true // Output the default styling | 
|  | 108 | +  ]); | 
|  | 109 | +} | 
|  | 110 | +``` | 
0 commit comments