Skip to content

Checkbox list

CheckboxList dehydrates a list of selected option keys — permissions, feature flags, or tag-like sets that should stay visible as checkboxes rather than a multi select. Cast the model attribute to a list/JSON array. For mutually exclusive choices use Radio; for compact multi-pick UIs prefer Multi select.

Each variation below includes a short explanation, the fluent API to paste into your schema, and light/dark screenshots of the rendered control.

Pass a value → label map to .options(). Selected keys are stored as a list in form state.

app/orbit/resources/app_resource.py
CheckboxList.make('features')
.label('Features')
.options({
'api': 'API access',
'sso': 'SSO',
'webhooks': 'Webhooks',
})

Orbit Basic checkbox list (light)

Orbit Basic checkbox list (dark)

.descriptions() adds helper copy under matching option keys. Use the same keys as .options() so each description aligns with its label.

app/orbit/resources/app_resource.py
CheckboxList.make('technologies')
.label('Technologies')
.options({
'tailwind': 'Tailwind CSS',
'alpine': 'Alpine.js',
'laravel': 'Laravel',
})
.descriptions({
'tailwind': 'Utility-first CSS for rapid UI work.',
'alpine': 'Lightweight behavior in your markup.',
'laravel': 'The PHP framework for web artisans.',
})

Orbit Option descriptions (light)

Orbit Option descriptions (dark)

.options_columns(n) lays options out in an n-column grid so dense permission lists stay scannable without a long vertical stack.

app/orbit/resources/app_resource.py
CheckboxList.make('technologies')
.label('Technologies')
.options({
'tailwind': 'Tailwind CSS',
'alpine': 'Alpine.js',
'laravel': 'Laravel',
'livewire': 'Livewire',
})
.options_columns(2)

Orbit Multi-column layout (light)

Orbit Multi-column layout (dark)

.bulk_toggleable() adds select-all / deselect-all controls above the list — essential when dozens of options would otherwise require tedious clicking.

app/orbit/resources/app_resource.py
CheckboxList.make('features')
.label('Features')
.options({
'api': 'API access',
'sso': 'SSO',
'webhooks': 'Webhooks',
'audit': 'Audit log',
})
.bulk_toggleable()
.options_columns(2)

Orbit Bulk toggle (light)

Orbit Bulk toggle (dark)

.disable_option_when() receives each option value and returns True when that checkbox should be non-interactive — plan-gated features, deprecated flags, etc.

app/orbit/resources/app_resource.py
CheckboxList.make('technologies')
.label('Technologies')
.options({
'tailwind': 'Tailwind CSS',
'alpine': 'Alpine.js',
'livewire': 'Livewire',
})
.disable_option_when(lambda value, **_: value == 'livewire')

Orbit Disabling specific options (light)

Orbit Disabling specific options (dark)

Closures work on .label(), .helper_text(), .placeholder(), .visible(), .disabled(), and .required() where applicable — see Form closures.