Skip to content

Checkbox ​

The checkbox input type renders a single boolean toggle using Vuetify's v-checkbox. It stores a truthy/falsy value and is appropriate for boolean flags on a model.

Hydrate ​

Class: CheckboxHydrateConfig type: checkboxOutput type: checkbox (Vuetify v-checkbox)

Usage ​

Basic checkbox ​

php
[
    'type'  => 'checkbox',
    'name'  => 'is_active',
    'label' => 'Active',
]

Custom true/false values ​

php
[
    'type'       => 'checkbox',
    'name'       => 'is_featured',
    'label'      => 'Featured',
    'trueValue'  => 'yes',
    'falseValue' => 'no',
]

Custom color ​

php
[
    'type'  => 'checkbox',
    'name'  => 'is_published',
    'label' => 'Published',
    'color' => 'primary',
]

Schema Defaults ​

KeyDefaultDescription
color'success'Vuetify color for the checked state
trueValue1Value stored when the checkbox is checked
falseValue0Value stored when the checkbox is unchecked
hideDetailstrueHide validation detail row below the checkbox
default0Initial value (always set to 0 by the hydrate)

See Also ​