ui/Button
Unstyled button components and behaviors to be customized by a theme or application.
Members
Section titled “Members ”Button Component
Section titled “Button   Component ”A minimally-styled button component with touch support.
Extends:
ui/Buttonui/Button.ButtonBase
Wrapped with:
ui/Buttonui/Button.ButtonDecorator
ButtonBase Component
Section titled “ButtonBase   Component ”A basic button component structure without any behaviors applied to it.
Properties
Called with a reference to the root component.
When using ui/Buttonui/Button.Button, the ref prop is forwarded to this component
as componentRef.
Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.
The following classes are supported:
button- The root component classbg- The background node of the buttonclient- The content node of the buttonhasIcon- Applied when there is aniconpresenticon- The icon node, wheniconis setlarge- Applied whensizeprop is'large'minWidth- Applied whenminWidthprop istruepressed- Applied whenpressedprop istrueselected- Applied whenselectedprop istruesmall- Applied whensizeprop is'small'
disabled
Section titled “disabled”Applies the disabled class.
When true, the button is shown as disabled.
The icon displayed within the Button.
The icon will be displayed before the natural reading order of the text, regardless
of locale. Any string that is valid for its ui/Buttonui/Button.Button.iconComponent is
valid here. If icon is specified as a string and iconButton is undefined, the icon is
not rendered.
This also supports a custom icon, in the form of a DOM node or a Component, with the caveat that if you supply a custom icon, you are responsible for sizing and locale positioning of the custom component.
Setting this to true means the iconComponent will be rendered but with empty content.
This may be useful if you've customized the iconComponent to render the icon content
externally.
The component used to render the ui/Buttonui/Button.ButtonBase.icon.
This component will receive the icon class to customize its styling.
If ui/Buttonui/Button.ButtonBase.icon is not assigned or is false, this component
will not be rendered.
If this is a component rather than an HTML element string, this component will also
receive the size and iconFlip (as flip) properties and should be configured to
handle it.
iconFlip
Section titled “iconFlip”Flips the icon.
minWidth
Section titled “minWidth”Enforces a minimum width for the component.
Applies the minWidth CSS class which can be customized by
/docs/developer-guide/theming//docs/developer-guide/theming/.
pressed
Section titled “pressed”Indicates the component is depressed.
Applies the pressed CSS class which can be customized by
/docs/developer-guide/theming//docs/developer-guide/theming/.
selected
Section titled “selected”Indicates the component is selected.
Applies the selected CSS class which can be customized by
/docs/developer-guide/theming//docs/developer-guide/theming/.
The size of the button.
Applies the CSS class which can be customized by /docs/developer-guide/theming//docs/developer-guide/theming/.
ButtonDecorator Higher-Order Component
Section titled “ButtonDecorator   Higher-Order Component ”A higher-order component that adds touch support to a ui/Buttonui/Button.ButtonBase.
Includes:
ui/Touchableui/Touchable.Touchable