VitNode
Forms

Checkbox

A control enabling the user to toggle between checked and unchecked states.

Shadcn UI

This component is part of Shadcn UI with some modifications.

Preview

Usage

import { z } from 'zod';
import { AutoForm } from 'vitnode-frontend/form/auto-form';
import { AutoFormCheckbox } from 'vitnode-frontend/form/fields/checkbox';
const formSchema = z.object({
  allow_files: z.boolean(),
});
<AutoForm
  formSchema={formSchema}
  fields={[
    {
      id: 'allow_files',
      component: AutoFormCheckbox, 
    },
  ]}
/>

API Reference

Radix UI Checkbox.

On this page