An open source design system that's fully customizable and agent ready
TypeScript
docs(buttons): a caller onClick on a standalone ToggleButton runs first and can cancel the toggle (#7638)
Cindy Zhangab795478ab6e
diff --git a/docs/families/buttons.md b/docs/families/buttons.mdindex d86069b931..4dc2de7a56 100644--- a/docs/families/buttons.md+++ b/docs/families/buttons.md@@ -128,6 +128,10 @@ Membership follows public responsibility, not an import of Button or a renderedevent prevents the Action. Standalone ToggleButton runs `onPressedChange`synchronously before `pressedChangeAction` and skips the Action when the callbackcalls `preventDefault()`. The Action also runs when no callback is supplied.+ A caller `onClick` on a standalone ToggleButton runs before `onPressedChange`+ and `pressedChangeAction`. When that `onClick` calls `preventDefault()`, the+ activation requests no next state and neither runs; otherwise the toggle+ proceeds. A caller `onClick` never replaces the toggle request.Without `pressedChangeAction`, callback-only activation MUST remain synchronousand report no Action-pending feedback. A fire-once action deduplicates activationwhile pending; an explicitly interruptible persistent action may accept a new