Default
Add a checkbox type input easily and with a beautiful animation
Add a checkbox type input easily and with a beautiful animation
Change the color of the component with the color property, the allowed values are (main colors of Sax Design, RGB, HEX)
By default the component is used with a boolean value that when being checked returns true and when not being checked returns false
You may need to return a string when the component is checked for it use the value property with the string you want to return
It is used for multiple checkboxes which are bound in one group, and indicates whether one option is selected by checking if it is checked.
checkbox-group element can manage multiple checkboxes in one group by using v-model which is bound as an Array. Inside the el-checkbox element, label is the value of the checkbox. If no content is nested in that tag, label will be rendered as the description following the button of the checkbox. label also corresponds with the element values in the array. It is selected if the specified value exists in the array, and vice versa.
Pass options to let CheckboxGroup render flat or sectioned choices. A section heading selects all enabled children and automatically becomes indeterminate when only part of the section is selected. columns controls the grid and collapses to one column on small screens.
CheckboxGroupTabs combines a platform switcher with grouped choices. The checkbox before a tab selects or clears the whole platform, while clicking its label only switches the visible content. Active tabs use color, surface and shadow instead of borders.
Change the icon inside the checkbox with the icon slot. Custom icons use a white foreground while checked. Stroke SVG paths are drawn automatically; filled icons use a scale and clip reveal. Set icon-animation to draw, pop, or none to override the automatic choice. The slot exposes checked and indeterminate for fully custom motion.
Default icons
Sax Design Vue renders build-time Iconify SVG data. Built-in controls, such as close buttons in Alert or Popup, use SVG icons and require no external icon font. Use the #icon slot when a product needs another icon.
Find and use icons
Search Boxicons for a collection and copy its prefix:name value into SIcon.
Add a label to the checkbox with the default slot of the component
Add a loading status to the component with the property loading
Add a line in the middle of the label when the checkbox is checked with the property line-through
There are some cases where you have several checkboxes and you need one that manages all the others for this you can do it with the indeterminate property that adds a different style to the checkbox
| Property | Type | Default | Description |
|---|---|---|---|
v-model | CheckboxValue[] | [] | Flat array containing every selected child value. |
options | (CheckboxGroupOption | CheckboxGroupSection)[] | [] | Data-driven options; an item with options becomes a selectable section. |
columns | number | 1 | Default column count. A section can override it with its own columns. |
gap | number | string | 12 | Row and column gap. Numbers are treated as pixels. |
disabled-values | CheckboxValue[] | [] | Disable child values and preserve them during section select/clear actions. |
disabled-group-values | CheckboxValue[] | [] | Disable select-all for the specified sections. |
disabled | boolean | false | Disable the whole group. |
min / max | number | - | Minimum and maximum selected value counts. |
CheckboxGroupOption supports label, value, disabled, and description. CheckboxGroupSection supports label, value, options, disabled, and columns. Child value entries must remain unique within a CheckboxGroup or tab.
Events: update:modelValue(value) and change(value). Slots: option, group-label, and empty. The default slot remains compatible with manually composed Checkbox children when options is omitted.
| Property | Type | Default | Description |
|---|---|---|---|
v-model | Record<string, CheckboxValue[]> | {} | Selected values stored independently by tab value. |
tabs | CheckboxGroupTab[] | [] | Tabs containing label, value, and grouped options. |
active-key / v-model:active-key | string | number | First enabled tab | Active tab. |
columns | number | 2 | Default content column count. |
gap | number | string | 12 | Content row and column gap. |
disabled | boolean | false | Disable every tab and option. |
Events: update:modelValue(value), change(value, activeKey), update:activeKey(activeKey), and tabChange(activeKey). Slots: tab, option, group-label, and empty.