Loading...
Loading...
Add checkboxes with ShadCheckbox and ShadCheckboxFormField; label, sublabel, form validation. Use when adding boolean toggles or terms acceptance in a Flutter shadcn_ui app or ShadForm.
npx skill4agent add serverpod/skills-registry shadcn_ui-checkboxShadCheckboxvalueonChangedlabelsublabelShadCheckboxFormFieldidvalidatorShadCheckbox(
value: value,
onChanged: (v) => setState(() => value = v),
label: const Text('Accept terms and conditions'),
sublabel: const Text(
'You agree to our Terms of Service and Privacy Policy.',
),
)ShadCheckboxFormField(
id: 'terms',
initialValue: false,
inputLabel: const Text('I accept the terms and conditions'),
onChanged: (v) {},
inputSublabel: const Text('You agree to our Terms and Conditions'),
validator: (v) {
if (!v) return 'You must accept the terms and conditions';
return null;
},
)