Checkbox

Checkboxes allow users to select one or more options from a list, enabling flexible decision-making in forms

Overview

The checkbox component is a themed version of FormKit’s checkbox input, it can handle both single and multiple selections.

For more detailed information about FormKit’s checkbox component and configuration, refer to the official FormKit checkbox documentation.

Basic usage

Check out the FormKit documentation in the Foundations section, this will help you get set up if you haven’t worked with FormKit before.

Importing the component

To use the checkbox component ensure that your application has been configured to use the FormKit plugin.

You can then either include the checkbox config in your FormKit schema, or use a standalone FormKit component.

Example usage

After registering the checkbox component, use it within your FormKit forms as shown below:


                                                        
                                                        
                                                            <FormKit
                                                          type="checkbox"
                                                          label="Agree to Terms"
                                                          name="terms"
                                                          :value="true"
                                                        />
                                                        
                                                            

Accessibility

The checkbox component inherits accessibility features from the native HTML <input type="checkbox">. It supports keyboard navigation and customisable accessible labels.