Documentation Index
Fetch the complete documentation index at: https://mintlify.com/rijvi-mahmud/shaddy/llms.txt
Use this file to discover all available pages before exploring further.
CheckboxGroupField renders a collection of shadcn/ui Checkbox elements from a list of option objects, wiring them into ShaddyForm so the bound value is a string[] array of the currently checked option values. Checking or unchecking an item adds or removes it from the array, and validation errors are shown automatically via <FormMessage>.
Installation
Install all ShaddyForm fields at once with theshaddy-form registry item:
Usage
Props
The field name. Must match a key in your Zod schema passed to
ShaddyForm. The bound value is a string[].Array of option objects.
value is stored in the form array when checked; text is the label displayed next to each checkbox.Group label rendered above all the checkboxes. Omit to hide the group label.
When
true, appends a red asterisk to the group label as a visual indicator.When
true, disables all checkboxes in the group.When
true (the default), checkboxes are stacked vertically. Set to false to arrange them in a horizontal wrapping row.Additional CSS classes applied to the outermost
FormItem wrapper.Notes
CheckboxGroupFieldmust be rendered inside a<ShaddyForm>— it readscontrolfromuseFormContextinternally.- The bound value is a
string[]. Initialise your schema field withz.array(z.string())and an empty array default ininitialValues. - For a single boolean checkbox (e.g. “Accept terms”), use
CheckboxFieldinstead. - Validation errors (e.g. minimum selection count) are rendered below the group via
<FormMessage>.