Checkbox Groups

Efficient multi-checkbox management.

Checkbox group attribute simplifies managing multiple checkboxes by grouping them together and applying validation and navigation controls seamlessly.

Setup

Attribute: sf-checkbox-group

Value: myGroupName (e.g., "someOptions")

Where: Applied to the container element of a group of checkboxes.

Keyboard Navigation

By default, keyboard navigation number (0-9) is enabled for a checkbox group.

β†’ Check more in Checkbox & Radio Bindings.


Defining a Checkbox Group

In this example we are creating a checkbox group and apply a validation of minimum 2 and maximum of 4 options that are allowed.

HTML Example

Webflow Example

Dos and Dont's


Do βœ…:

  • Ensure all checkboxes within the group have the same name.

  • Use sf-checkbox-group to manage validation collectively.

  • Target the group with sf-error for error handling. Use the name of the group as the value for the sf-error attribute (see Setup - Error Binding).

Don't ❌:

  • Use different names for checkboxes within the same group.

Last updated

Was this helpful?