SubComponents
Header, Actions and Divider.
This subcomponents are extended from the Menu. This subcomponents docs can be found in the Menu subcomponents page. They work in the same way they are being used there.
Control
The control subcomponent is required to render the Control
of the TextInput component. This component extends the native div
tag props.
Control API
Notice that there is a difference between using hasError, isDisabled, isReadOnly
here or in the parent component. It is not recommended to change this props in the Control
subcomponent, because this props can be inherited from the Wrapper
. If you use it in the Control
subcomponent, you will get the state only in the field.
children
ReactNode
✅
placeholder
string
❌
defaultValue
string
❌
defaultOpen
boolean
❌
value
string
❌
showModeOption
'value' | 'children' | 'customValue'
❌
hasError
boolean
❌
isDisabled
boolean
❌
isReadOnly
boolean
❌
menuWidth
string
❌
Option
The Option Subcomponent receives a children that renders content that when clicked, closes the Menu
automatically.
Option API
This component extends the native <div> API. That's why the className
prop is not included in the table.
value
string
✅
layout
'horizontal' | 'vertical'
❌
children
ReactNode
❌
customValue
ReactNode
❌
isDisabled
boolean
❌
isSelected
boolean
❌
isHidden
boolean
❌
onClick
(e: MouseEvent) => void;
❌
HelpText
The HelpText subcomponent extends the SDS HelpText component. See for reference: HelpText
Label
The Label subcomponent extends the SDS label component. See for reference: Label
Last updated