SubComponents
Trigger
The trigger is the element that will control the render of the Menu
. The trigger API does NOT extend the native div element props, so be careful with that.
Trigger API
children
ReactNode
✅
SubTrigger
The subtrigger is the element that will control the render of the Menu.Sub
. The trigger API does NOT extend the native div element props, so be careful with that.
Sub
This subcomponent extends the native div
props. This would render a SubMenu
that must be inside a Menu.
children
ReactNode
✅
CustomArea
An space to render custom elements in the menu.
CustomArea API
This subcomponent extends the native div
props.
children
ReactNode
✅
Divider
The divider subcomponent renders a visual element that represents a division. This component also extends the native div props.
Search
The Search subcomponent extends the SDS search component. See for reference: Search.
Option
The Option
Subcomponent receives a children that renders content that when clicked, closes the Menu automatically.
Option API
This subcomponent extends the native <div> API. That's why the className prop is not included in the table.
children
ReactNode
layout
'horizontal' | 'vertical';
isDisabled
boolean
isSelected
boolean
isHidden
boolean
onClick
(e: MouseEvent) => void;
Header
The header subcomponent is used to render a title. This subcomponent should always be the parent of the Actions
subcomponent, in order to mantain the composition pattern always working.
children
ReactNode
Actions
The actions subcomponent is and should always be wrapped by a Menu.Header. This subcomponent also extends the native div
API. You should know that all SDS Buttons that are passed as children to the Actions subcomponents, the type will be converted to small buttons.
Last updated