You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Button should be forwardRef so consumers can attach refs #37
It is not wrapped in React.forwardRef, so a consumer passing ref gets no DOM node and no compile-time warning — the ref silently does nothing.
Motivating case: workbench's stage-search.tsx needs ref={buttonRef} to restore keyboard focus to the trigger button after its command palette closes. During a recent pass converting workbench's raw controls to react-ui primitives (corbitsdev/workbench#217), this site had to stay on a raw <button> specifically because swapping to Button would have silently broken that focus restoration.
Ask: wrap Button in React.forwardRef<HTMLButtonElement, ButtonProps> (mirroring how ref-forwarding is presumably already handled for any other interactive primitives in this library), so ref works whether asChild is set or not.
Activity
TheGreatAxios commentedon Sep 30, 2026
Closing this for now as not needed