diff --git a/frontend/src/components/ui/checkbox.test.tsx b/frontend/src/components/ui/checkbox.test.tsx
new file mode 100644
index 0000000..f934d29
--- /dev/null
+++ b/frontend/src/components/ui/checkbox.test.tsx
@@ -0,0 +1,105 @@
+import { describe, expect, it } from 'vitest';
+import { render, screen } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+import { useForm } from 'react-hook-form';
+import { Checkbox, CheckboxField } from './checkbox';
+import { Radio, RadioField, RadioGroup } from './radio';
+
+describe('Checkbox', () => {
+ it('is a real checkbox: Space toggles it and the label is clickable', async () => {
+ render();
+ const box = screen.getByRole('checkbox', { name: 'Uitgelicht' });
+
+ box.focus();
+ await userEvent.keyboard(' ');
+ expect(box).toBeChecked();
+
+ await userEvent.click(screen.getByText('Uitgelicht'));
+ expect(box).not.toBeChecked();
+ });
+
+ it('shows the in-between state and does not change its value', () => {
+ render();
+ const box = screen.getByRole('checkbox', { name: 'alles' }) as HTMLInputElement;
+
+ expect(box.indeterminate).toBe(true);
+ expect(box).not.toBeChecked();
+ });
+
+ it('can be disabled and marked invalid', async () => {
+ render();
+ const box = screen.getByRole('checkbox', { name: 'x' });
+
+ expect(box).toBeDisabled();
+ expect(box).toHaveAttribute('aria-invalid', 'true');
+ await userEvent.click(box);
+ expect(box).not.toBeChecked();
+ });
+
+ it('draws with the colours of the theme (accent when checked, a visible border, a focus ring)', () => {
+ render();
+ const cls = screen.getByRole('checkbox').className;
+
+ expect(cls).toContain('checked:bg-primary');
+ expect(cls).toContain('border-muted-foreground');
+ expect(cls).toContain('focus-visible:ring-ring');
+ expect(cls).toContain('forced-colors:checked:bg-[Highlight]');
+ });
+
+ it('works with react-hook-form register, like the native input it replaces', async () => {
+ function Form({ onSubmit }: { onSubmit: (v: { on: boolean }) => void }) {
+ const { register, handleSubmit } = useForm<{ on: boolean }>({ defaultValues: { on: false } });
+ return (
+
+ );
+ }
+ let saved: { on: boolean } | null = null;
+ render(
+