-
-
Notifications
You must be signed in to change notification settings - Fork 86
Checkbox
tanthammar edited this page Nov 18, 2020
·
6 revisions
Extends BaseField
The placeholder attribute becomes the checkbox label
Checkbox::make('Checkbox') //cast to boolean on model
->placeholder('The checkbox label')
->rules('boolean')
->default(1); //equivalent to checked
<x-tall-checkbox
:field="$field"
/>
Extend Blade component (or override in config file)
Tanthammar\TallForms\Components\Checkbox::class
Theme
/* Checkbox */
/* If you want to change the color, see tailwind custom form documentation */
.tf-checkbox {
@apply mt-1;
}
.tf-checkbox-label {
@apply text-sm text-gray-900;
}
.tf-checkbox-label-spacing {
@apply ml-2 block;
}
- Installation
- Requirements
- v5 Upgrade Guide
- v6 Upgrade Guide
- v7 Upgrade Guide
- Support
- Quickstart
- Manual installation
- Optional
- Form component
- Field
- Field types
- Example Form
- Blade Components
- Notifications