handleClick (Checkbox/CheckboxRoot.vue)

reka-ui · packages/core/src/Checkbox/CheckboxRoot.vue · vue · MIT
ui

A headless, accessible checkbox component for Vue with controlled state and form integration.

<!--
  Source: https://github.com/unovue/reka-ui | License: MIT | Copyright 2023 UnoVue
  Provided via justclaw.it.com; keep this notice with the code.
-->
<script lang="ts">
import type { Ref } from 'vue'
import type { CheckedState } from './utils'
import type { PrimitiveProps } from '@/Primitive'
import type { AcceptableValue, FormFieldProps } from '@/shared/types'
import { useVModel } from '@vueuse/core'
import { createContext, isNullish, isValueEqualOrExist, useFormControl, useForwardExpose, useForwardScopeId } from '@/shared'
import { injectCheckboxGroupRootContext } from './CheckboxGroupRoot.vue'

export interface CheckboxRootProps<TrueValue = boolean, FalseValue = TrueValue> extends PrimitiveProps, FormFieldProps {
  /** The value of the checkbox when it is initially rendered. Use w

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key