Skip to content
Theme:

Ui3nCheckbox

Checkbox component with support for custom values, indeterminate state, and various customization options.

Props

NameTypeDefaultDescription
idstring | undefined

Root element id

namestring | undefined

HTML name attribute for form submission

modelValue*Ui3nCheckboxValuefalse

Current checkbox value

checkedValueUi3nCheckboxValue | undefinedtrue

Value when checkbox is checked

uncheckedValueUi3nCheckboxValue | undefinedfalse

Value when checkbox is unchecked

sizestring | number | undefined16

Checkbox size

colorstring | undefined"var(--color-icon-control-accent-default)"

Checkbox color

indeterminateboolean | undefinedfalse

Whether checkbox is in indeterminate state

disabledboolean | undefinedfalse

Whether checkbox is disabled

Events

Event NameArguments / Value TypeDescription
update:modelValuevalue: Ui3nCheckboxValue
changevalue: Ui3nCheckboxValue

Slots

Slot NameScope Props (v-slot)Description
#default

Default slot

Public Methods & Exposes

Method NameSignature / TypeDescription
clear()() => void

Usage Examples

Basic usage

Basic usage

Simple checkbox with v-model binding

Value: false

With label

With label

Checkbox with text label using default slot

I agree to the Terms and Conditions
Subscribe to newsletter

Sizes

Sizes

Different checkbox sizes: 12px, 16px, 24px, 32px

Small (12px)
Medium (16px) - default
Large (24px)
Extra Large (32px)

Colors

Colors

Custom checkbox colors using the color prop

Blue
Green
Red
Purple
Orange

Indeterminate state

Indeterminate state

Checkbox in indeterminate (partial) state - useful for select all scenarios

Select All
Item 1
Item 2
Item 3
Item 4
Selected: 2 of 4

Disabled state

Disabled state

Disabled checkbox that cannot be interacted with

Enabled checkbox
Disabled (checked)
Disabled (unchecked)

Custom values

Custom values

Using custom checkedValue and uncheckedValue instead of boolean

String values (active/inactive):
Status: inactive
Number values (1/0):
High priority: 0
Theme selection:
Dark mode: OFF