Button
API documentation for the React Native Button component. Learn about the available props.
#
Importimport { Button } from "@react-native-material/core";// orimport Button from "@react-native-material/core/Button";
#
Propsinterface ButtonProps extends TouchableSurfaceProps { title: string | React.ReactElement | ((props: { color: string }) => React.ReactElement | null) | null;
leading?: React.ReactElement | ((props: { color: string; size: number }) => React.ReactElement | null) | null;
trailing?: React.ReactElement | ((props: { color: string; size: number }) => React.ReactElement | null) | null;
variant?: "contained" | "outlined" | "text";
color?: PaletteColor;
tintColor?: PaletteColor;
uppercase?: boolean;
compact?: boolean;
disableElevation?: boolean;
loading?: boolean;
loadingIndicator?: string | React.ReactElement | ((props: { color: string }) => React.ReactElement | null) | null;
loadingIndicatorPosition?: "leading" | "trailing" | "overlay";
titleStyle?: StyleProp<TextStyle>;
leadingContainerStyle?: StyleProp<ViewStyle>;
trailingContainerStyle?: StyleProp<ViewStyle>;
loadingOverlayContainerStyle?: StyleProp<ViewStyle>;}