Skip to main content

Button

API documentation for the React Native Button component. Learn about the available props.

Import#

import { Button } from "@react-native-material/core";// orimport Button from "@react-native-material/core/Button";

Props#

interface 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>;}