There is a breaking change to this component in the next version of NUI Widgets.
The readOnly prop will behave differently in a future version of NUI Widgets. InputGroup Buttons and Addons will no longer appear in readOnly InputGroups.
Input group components are used for standardizing the styling of FormControl components that are combined with buttons or add-ons (fixed regions with static text).
Examples
With Add-on
An add-on is static text that appears before or after the input element.
ReadOnly is not a supported state for the InputGroup component.
Usage
InputGroup
Properties
Property
Type
Default
Description
children
Node
Required
Collection of React components to be included in the InputGroup. These will typically be a FormControl component along with either an InputGroup.Addon or InputGroup.Button.
className
String
Custom classes to add to the <span> tag.
disabled
Boolean
false
Controls whether the component and its children are enabled or disabled.
size
String
'lg'
Size of the element. Options are 'lg', 'md', 'sm'.
InputGroup.Addon
Properties
Property
Type
Default
Description
children
Node
React component to be included in the InputGroup.Addon.
className
String
Custom classes to add to the <span> tag.
Callbacks
Property
Parameters
Description
onClick
event
Callback function for onClick events.
InputGroup.Button
Properties
Property
Type
Default
Description
children
Node
Required
React component to be included in the InputGroup.Button. This will typically be either a Button or ButtonDropdown.