src/Bootstrap/Traits/BuildsForms.php
public function checkBox($name = null, $description = null, $isChecked = false): CheckBox
    {
        $isChecked = $this->getFieldValue($name, $isChecked);
        $element = new CheckBox($this->formState);

        return $element
            ->nameIf($name, $name)
            ->idIf($name, field_name_to_id($name, 'wrapper'))
            ->description($description)
            ->checked($isChecked);
    }
public function checkBox($name = null, $description = null, $isChecked = false): CheckBox
    {
        $isChecked = $this->getFieldValue($name, $isChecked);
        $element = new CheckBox($this->formState);

        return $element
            ->nameIf($name, $name)
            ->idIf($name, field_name_to_id($name, 'wrapper'))
            ->description($description)
            ->checked($isChecked);
    }
@param string|null $name
@param string|null $description
@param bool        $isChecked

@return \MarvinLabs\Html\Bootstrap\Elements\CheckBox