| name | build-interactive-forms |
| description | Use when constructing forms, inputs, submit behaviors, validation displays, and feedback toast alerts. |
Build Interactive Forms Playbook
Ensure all input grids and form components are clear, accessible, and provide immediate interactive user feedback:
-
Primitive Form Fields:
-
Loading / Submitting States:
- Disable all inputs and button elements when form requests are processing (
submitting state).
- Display a spinner or "Processing..." text inside the submit button.
-
Validation & Toast Alerts:
- Always validate inputs client-side before sending requests (e.g. checking length or empty inputs).
- On successful save operations, display a green success notification:
toast("Diamond record created successfully!", "success");
- On failure, show red error indicators and do not reset inputs:
toast(error.message || "Failed to create record", "error");