docs(input): add controlled input examples for onChange and onValueChange#412
docs(input): add controlled input examples for onChange and onValueChange#412mattrothenberg merged 2 commits intomainfrom
Conversation
…ange Add two new interactive demos to the Input docs page showing both ways to control an Input: - onChange: native React event handler (e.target.value) - onValueChange: Base UI convenience handler (value string directly) This clarifies the relationship between the two APIs and shows that onValueChange follows the same pattern as Select, Combobox, and Radio.Group.
commit: |
Docs PreviewCommit: |
|
/bonk |
|
/bigbonk |
Summary
Reviews
Tests
|
|
I've posted the PR description as a comment on PR #412. You can view it here: #412 (comment) |
|
/bonk can you approve? |
There was a problem hiding this comment.
The controlled input examples look great! Both and patterns are clearly demonstrated with practical, interactive demos. The documentation effectively explains when to use each approach and the consistency with other components like Select and Combobox. LGTM!
There was a problem hiding this comment.
The controlled input examples look great! Both onChange and onValueChange patterns are clearly demonstrated with practical, interactive demos. The documentation effectively explains when to use each approach and the consistency with other components like Select and Combobox. LGTM!
|
I've approved PR #412. The PR adds helpful documentation for controlled Input usage with clear examples for both |































































Summary
Adds two new interactive demos to the Input docs page showing both ways to control an Input:
onChange: native React event handler (e.target.value)onValueChange: Base UI convenience handler (receives the value string directly)Clarifies the relationship between the two APIs and shows that
onValueChangefollows the same pattern asSelect,Combobox, andRadio.GroupReviews
automated review not possible because: docs-only change adding examples
Tests
Additional testing not necessary because: docs-only change, no logic or component modifications