Implement bootstrap 4 checkboxes style in yii\grid\CheckboxColumn

I’m using bootstrap 4 and I want to customize my checkbox inputs like the new checkboxes bootstrap 4 style

So im usign the GridView::widget and in the checkbox colum I use yii\grid\CheckboxColumn class, but I dont know how to do it.

I tried the fallowing

'columns' => [


                'class' => 'yii\grid\CheckboxColumn',

                'cssClass' => 'checkbox-select',

                'headerOptions' => ['style' => 'width:5px'],

                'header' =>  '<div class="custom-control custom-checkbox">'.Html::checkBox('selection_all', false, ['id' => 'customCheck1', 'type' => 'checkbox', 'class' => 'custom-control-input select-on-check-all']).'<label class="custom-control-label" for="customCheck1"></label></div>',

                'checkboxOptions' => function($model){

                    return ['<div class="custom-control custom-checkbox">'.Html::checkBox('selection', false, ['id' => "'customCheck".$model->id."'", 'class' => 'custom-control-input']).'<label class="custom-control-label" for="customCheck'.$model->id.'"></label></div>'];




It only works in the table header but not in the other checkboxes.