Skip to main content
Version: 4.0.0-rc.3

Button

Buttons are touchable elements used to interact with the screen and to perform and operation. They may display text, icons, or both. Buttons can be styled with several props to look a specific way. Also receives all TouchableNativeFeedback (Android) or TouchableOpacity (iOS) props.

<Button title="Solid Button" />

Import

import { Button } from '@rneui/themed';

Usage

Variants

Loading...

Size

Loading...

Colors

Loading...

Button with icon

Loading...

Button with right icon

Loading...

Button with loading spinner

Loading...

Props

note

Includes all TouchableOpacity props.

NameTypeDefaultDescription
TouchableComponenttypeof ComponentComponent for user interaction.
ViewComponentReact ComponentComponent for container.
buttonStyleView StyleAdd additional styling for button component.
colorstring or primary or secondary or success or warning or errorColor of button.
containerStyleView StyleStyling for Component container.
disabledbooleanfalseDisables user interaction.
disabledStyleView StyleStyle of the button when disabled.
disabledTitleStyleText StyleStyle of the title when disabled.
iconIconNodeDisplays a centered icon (when no title) or to the left (with text). (Can be used along with iconRight as well). Can be an object or a custom component.
iconContainerStyleView StyleStyling for Icon Component container.
iconPositionleft or right or top or bottomleftDisplays Icon to the position mentioned. Needs to be used along with icon prop.
iconRightbooleanfalseDisplays Icon to the right of title. Needs to be used along with icon prop.
linearGradientPropsobjectDisplays a linear gradient.
loadingbooleanfalseProp to display a loading spinner.
loadingPropsActivityIndicatorPropsAdd additional props for ActivityIndicator component.
loadingStyleView StyleAdd additional styling for loading component.
radiusnumber or sm or md or lgxsRadius of button.
raisedbooleanfalseAdd raised button styling (optional). Has no effect if type="clear".
sizesm or md or lgmdButton size.
titlestring or ReactElement<{}, string or JSXElementConstructor<any>>Add button title.
titlePropsTextPropsAdd additional props for Text component.
titleStyleText StyleAdd additional styling for title component.
typesolid or clear or outlinesolidType of button.
uppercasebooleanfalseUppercase button title.

Playground

Loading...