-
Notifications
You must be signed in to change notification settings - Fork 898
Closed as not planned
Closed as not planned
Copy link
Labels
enhancementNew feature or requestNew feature or requesttriageAwaiting initial review and prioritizationAwaiting initial review and prioritizationv4#4488#4488
Description
Package
v4.0.0-alpha.x
Description
Currently, all NavigationMenuItem
entries are always rendered if included in the items
prop.
There is no built-in way to conditionally hide or show an item without removing it from the array.
This feature request adds a new boolean option visible
to NavigationMenuItem
.
export interface NavigationMenuItem {
...
/**
* Control whether the item should be rendered.
* @defaultValue true
*/
visible?: boolean
}
- If
visible: false
→ the item (and its children) will not be rendered in the menu. - If omitted, it defaults to
true
.
Additional context
- Useful for conditionally hiding menu entries (e.g., based on permissions, feature flags, or environment).
- Avoids the need to dynamically mutate the
items
array in parent components. - Keeps the developer experience simple and consistent with existing props.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesttriageAwaiting initial review and prioritizationAwaiting initial review and prioritizationv4#4488#4488