Checkbox
Terminal-style checkbox with [x] / [ ].
Checkbox
Design lines
[x] CI
vue
1<Tabs defaultValue="tuix">2 <TabsList>3 <Tab value="tuix">TUIX</Tab>4 <Tab value="rubik">Rubik</Tab>5 </TabsList>6 <TabPanel value="tuix">7 <Checkbox :model-value="true" label="CI" design="tuix" />8 </TabPanel>9 <TabPanel value="rubik">10 <Checkbox :model-value="true" label="CI" design="rubik" />11 </TabPanel>12</Tabs>Demo
Estado (modelValue / v-model)
Two checkboxes bound with v-model and their live state.
vue
1<Checkbox v-model="checked" label="Option A" />2<Checkbox v-model="checked2" label="Option B" />Etiqueta (label)
Each example keeps its own state: checking one never affects the others.
vue
1<script setup lang="ts">2import { ref } from 'vue'3import { Checkbox } from '@dowardev/herdrate-vue'45const labelTerms = ref(false)6const labelNews = ref(true)7</script>89<template>10 <Checkbox v-model="labelTerms" label="Accept terms" />11 <Checkbox v-model="labelNews" label="Enable notifications" />12</template>Color (color)
Every variant starts checked with its own state so each color is distinct.
vue
1<script setup lang="ts">2import { ref } from 'vue'3import { Checkbox } from '@dowardev/herdrate-vue'45const colorPrimary = ref(true)6const colorSuccess = ref(true)7const colorWarning = ref(true)8const colorDanger = ref(true)9</script>1011<template>12 <Checkbox v-model="colorPrimary" color="primary" label="Primary" />13 <Checkbox v-model="colorSuccess" color="success" label="Success" />14 <Checkbox v-model="colorWarning" color="warning" label="Warning" />15 <Checkbox v-model="colorDanger" color="danger" label="Danger" />16</template>Deshabilitado (disabled)
A disabled checkbox in both checked and unchecked states.
vue
1<Checkbox v-model="checked" disabled label="Disabled" />Events
| Event | Payload | Description |
|---|---|---|
update:modelValue | boolean | Emitted on toggle |
API
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | boolean | false | Checkbox state (v-model) |
color | 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark' | 'primary' | Bracket color |
disabled | boolean | false | Disable interaction |
label | string | '' | Text next to the checkbox |
design | 'tuix' | 'rubik' | — (inherits from data-design) | Design line (or inherit from data-design). |
CSS Custom Properties
| Token | Default | Description |
|---|---|---|
--font-mono | "JetBrains Mono", ui-monospace, monospace | Monospace font stack for code-like content (key labels, log lines, chips). |
--accent | from theme (--ctp-latte-mauve / --ctp-mocha-mauve) | Accent color, mapped from the active semantic color. |
--bg | from theme (--ctp-latte-base / --ctp-mocha-base) | Base background of the surface. |
--text | from theme (--ctp-latte-text / --ctp-mocha-text) | Primary text color used inside the component. |
--text-muted | from theme (--ctp-latte-subtext1 / --ctp-mocha-subtext1) | Secondary text for hints, annotations and disabled state. |
--color-primary | from theme (--ctp-latte-mauve / --ctp-mocha-mauve) | Primary semantic color (mauve in Catppuccin). |
--color-secondary | from theme (--ctp-latte-lavender / --ctp-mocha-lavender) | Secondary semantic color (lavender in Catppuccin). |
--color-tertiary | from theme (--ctp-latte-blue / --ctp-mocha-blue) | Tertiary semantic color (blue in Catppuccin). |
--color-success | from theme (--ctp-latte-green / --ctp-mocha-green) | Success semantic color (green in Catppuccin). |
--color-warning | from theme (--ctp-latte-yellow / --ctp-mocha-yellow) | Warning semantic color (yellow in Catppuccin). |
--color-danger | from theme (--ctp-latte-red / --ctp-mocha-red) | Danger semantic color (red in Catppuccin). |
--color-light | from theme (--ctp-latte-surface1 / --ctp-mocha-rosewater) | Light semantic color (lighter contrast tone). |
--color-medium | from theme (--ctp-latte-overlay0 / --ctp-mocha-overlay2) | Medium semantic color (mid-tone). |
--color-dark | from theme (--ctp-latte-text / --ctp-mocha-subtext1) | Dark semantic color (high contrast text). |
Ver Theming para la convención completa.