What this family solves
Native checkbox family with one CheckboxField component, two field-level compositions, and shared React/Vue contracts for component and grouped multi-select behavior.
Marwes documentation
Native checkbox family with one CheckboxField component, two field-level compositions, and shared React/Vue contracts for component and grouped multi-select behavior.
Native checkbox family with one CheckboxField component, two field-level compositions, and shared React/Vue contracts for component and grouped multi-select behavior.
Use CheckboxField for a single choice and CheckboxGroupField when several related checkboxes share one label.
Single checkbox with connected label, description and error
Fieldset of related checkboxes with grouped label and select-all indeterminate state
Choose an adapter in the verified examples. The inventory below reflects each framework package exactly.
@marwes-ui/reactCheckboxField, CheckboxGroupField
CheckboxFieldProps, CheckboxGroupFieldOption, CheckboxGroupFieldProps
@marwes-ui/vueCheckboxField, CheckboxGroupField
CheckboxFieldProps, CheckboxGroupFieldOption, CheckboxGroupFieldProps
@marwes-ui/svelteCheckboxField, CheckboxGroupField
CheckboxFieldProps, CheckboxGroupFieldOption, CheckboxGroupFieldProps
These examples come from the same fixtures verified by the repository checks.
import { CheckboxField, CheckboxGroupField } from "@marwes-ui/react"
import { useState } from "react"
export function Example() {
const [checked, setChecked] = useState(false)
const [values, setValues] = useState<string[]>(["1"])
return (
<>
<CheckboxField label="Label" checkbox={{ checked, onCheckedChange: setChecked }} />
<CheckboxGroupField
label="Group label"
options={[
{ value: "1", label: "Label" },
{ value: "2", label: "Label" },
{ value: "3", label: "Label" },
]}
value={values}
onChange={setValues}
/>
</>
)
}<script setup lang="ts">
import { ref } from "vue"
import { CheckboxField, CheckboxGroupField } from "@marwes-ui/vue"
const checked = ref(false)
const values = ref<string[]>(["1"])
</script>
<template>
<CheckboxField
label="Label"
:checkbox="{ checked, onCheckedChange: (v) => (checked = v) }"
/>
<CheckboxGroupField
label="Group label"
:options="[
{ value: '1', label: 'Label' },
{ value: '2', label: 'Label' },
{ value: '3', label: 'Label' },
]"
v-model="values"
/>
</template><script lang="ts">
import { CheckboxField, CheckboxGroupField } from "@marwes-ui/svelte"
let checked = $state(false)
let groupOne = $state(true)
let groupTwo = $state(false)
let groupThree = $state(false)
</script>
<CheckboxField
label="Label"
bind:checked
/>
<CheckboxGroupField label="Group label" description="Select all that apply">
<CheckboxField label="First option" bind:checked={groupOne} />
<CheckboxField label="Second option" bind:checked={groupTwo} />
<CheckboxField label="Third option" bind:checked={groupThree} />
</CheckboxGroupField>Checkbox uses Marwes preset CSS and theme variables. Customize it through the theme passed to MarwesProvider; do not add a second component stylesheet. See the theming guide for configuration and token details.