[navigation menu] Add generic Value typing#4328
Conversation
Codex ReviewOverviewThis patch adds generic value typing to Findings (None)No blocking issues found in this patch. Confidence: 4/5High confidence based on a full review of the branch diff, a second-pass sweep for render correctness, accessibility impact, API and state design, maintainability, performance risk, and test coverage, plus validation with Notes
|
commit: |
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Value typing
Summary
Adds generic value typing to
NavigationMenu.Rootsovalue,defaultValue, andonValueChangeinfer the selected item type the same way Accordion already does. This keeps the existing permissive default when no generic is provided while improving type safety for controlled and uncontrolled usage.Changes
NavigationMenuValue<Value>alias and thread the generic throughNavigationMenu.Rootprops and namespace exports.anydefault.